歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> Linux普通用戶偽裝root用戶

Linux普通用戶偽裝root用戶

日期:2017/3/3 16:56:59   编辑:關於Linux

1 版本信息

系統版本:Red Hat EnterpriseLinux *

2 配置步驟

2.1 添加新用戶

添加新用戶。

useradd  username

2.2 修改用戶密碼

修改用戶密碼。

passwd  username

2.3 修改passwd配置文件

修改passwd文件,將root的信息賦予新用戶username。

vi  /etc/passwd
 
#將root後面的內容復制給新用戶
root:x:0:0:root:/root:/bin/bash
username:x:0:0:root:/root:/bin/bash

2.4 驗證偽裝

使用su命令來驗證,如果顯示為root說明偽裝成功。

su - username
 
[root@hostname ~]#
Copyright © Linux教程網 All Rights Reserved