1
2
|
[root@moban ~]#whoami
root
|
1
|
[root@moban ~]#useradd xpleaf
|
1
|
[root@moban ~]#adduser xpleaf
|
1
2
3
4
5
|
[root@moban ~]# passwd xpleaf
Changingpassword
for
user xpleaf.
New password:
Retype newpassword:
passwd: allauthentication tokens updated successfully.
|
1
2
3
|
[root@moban ~]#echo
123456
|passwd --stdin xpleaf
Changingpassword
for
user oldboy.
passwd: allauthentication tokens updated successfully.
|
1
2
|
[root@moban ~]#history
388
echo
123456
|passwd --stdin xpleaf
|
1
2
|
[root@moban ~]#history -d
388
#清除行号为
388
的历史输入命令
[root@moban ~]#history –c #清除所有的历史输入命令
|
1
2
3
4
5
|
[root@moban ~]#whoami
root
[root@moban ~]#su - xpleaf
[oldboy@moban~]$ whoami
xpleaf
|
1
2
|
[oldboy@moban~]$ su - root
Password:
|
1
2
|
[oldboy@moban~]$ su - test
Password:
|
1
2
3
4
|
[root@moban ~]#whoami
root
[root@moban ~]#su xpleaf
[xpleaf@moban root]$
|
1
2
3
4
|
[xpleaf@moban root]$ exit
exit
[root@moban ~]#su - xpleaf
[xpleaf@moban~]$
|