CentOS用户管理基础
时间:2015-06-04 09:02 来源:linux.it.net.cn 作者:IT
[root@moban ~]#whoami
root
[root@moban ~]#useradd xpleaf
[root@moban ~]#adduser xpleaf
[root@moban ~]# passwd xpleaf
Changingpassword
for
user xpleaf.
New password:
Retype newpassword:
passwd: allauthentication tokens updated successfully.
[root@moban ~]#echo
123456
|passwd --stdin xpleaf
Changingpassword
for
user oldboy.
passwd: allauthentication tokens updated successfully.
[root@moban ~]#history
388
echo
123456
|passwd --stdin xpleaf
[root@moban ~]#history -d
388
#清除行号为
388
的历史输入命令
[root@moban ~]#history –c #清除所有的历史输入命令
[root@moban ~]#whoami
root
[root@moban ~]#su - xpleaf
[oldboy@moban~]$ whoami
xpleaf
[oldboy@moban~]$ su - root
Password:
[oldboy@moban~]$ su - test
Password:
[root@moban ~]#whoami
root
[root@moban ~]#su xpleaf
[xpleaf@moban root]$
[xpleaf@moban root]$ exit
exit
[root@moban ~]#su - xpleaf
[xpleaf@moban~]$
(责任编辑:IT)
|