In one of my previous post I have
mentioned about how to add a user in centos. Now I am going to show
you that how to switch from one user to another
From my terminal prompt you would be
able to detect the user
[root@server105 ~]#
Here the hash prompt and username
denotes that I have logged in as the root user in my server. Now I am
going to switch from the user root to user joji for that I will use
the switch user command su. You can find more options from the man
page of su
[root@server105 ~]# man su
So here I am going to switch the user
[root@server105 ~]# su - joji
[joji@server105 ~]$
From the prompt you can see that I have
successfully switched from root to joji As the root account is the
admin account it will not ask you for login credentials while
switching from root to any other user. Now we can try to switch back
to the root account from the user joji
[joji@server105 ~]$ su - root
Password:
[root@server105 ~]#
Hopes you people got it, Thank you
No comments:
Post a Comment