![]() ![]() I haven’t yet found a reason to use all of them as a programmer, but they’re definitely good to know. Reading through the man pages, there are many possible configurations that more precisely control environment variables, which shell to start with, and many other things. ![]() There is a lot more to learn about these commands, aside from the particular options that I’ve described here. I could sudo su to the user I wanted to be, and no password was required. In this exercise, I found that sudo su was the right option for me to achieve my desired effect. ![]() The only use that I can see for this is, as a system administrator, debugging issues that are user specific. sudo su - and su - Difference between su - and sudo su - What Is The Difference Between Sudo And Su In Linux The Difference. 1 Answer Sorted by: 26 When you provide a double-hyphen the experience you will have is identical to if you had just executed sudo su without any hyphen. bashrc/.bash_profile files, and drop you into the target user’s home directory. Modern Linux distributions preconfigure the first user to be able to sudo with her own password. However, you can setup sudo so that ordinary users can achieve root privileges with their own password by modifying /etc/sudoers (as root, preferably with visudo ). The -i option is supposed to stand for simulate initial login. 6 Answers Sorted by: 7 The su (and sudo) command traditionally require root 's password. Some key differences between su vs sudo include: su command in linux allows a user to switch to another user account and gain all of its privileges, while sudo command in linux allows a user to execute a specific command with the privileges of another user. When elevating privilege, we need to enter the root password.WARNING: Never give the root password to a normal user. You can use sudo to assign roles with specific privileges to certain users and groups. The sudo -u -i command is what you need to run if you want to simulate precisely the initial logged in state of another user. The su command grants root access by switching to the root account, while sudo grants elevated privileges to a specified user without switching accounts. In Linux, we can use either su or sudo to temporarily grant root access to a normal user. On SUSE Linux, sudo is configured to work similarly to su.However, sudo provides a flexible mechanism that allows users to run commands with the privileges of any other user. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |