InterviewSolution
| 1. |
In Unix, how do you switch from one user account to another? |
|
Answer» Switching between user accounts is accomplished by using the SU (Substitute User or Superuser) command. With the su command, you can execute functions or commands with another user's PRIVILEGES or as a DIFFERENT user, by default the root user. When running su, you must enter the password of the user you want to switch to. Syntax: su [OPTIONS] [USER [ARGUMENT...]]Without any options, su will run an interactive shell as a superuser (root). Example: GOURAV@localhost:~$ su madhuPassword: m1234madhu@localhost:~$Upon EXECUTION of su, it will ask for the password of the target user. If authenticated, it will GRANT access to the target user's account, as well as any files and directories the target user has access to. |
|