Extra care should always be taken when using the root account in this way. With a default /etc/sudoers configuration and membership in the sudo (or admin) group, you can assume root control using the command sudo su. There are times when prefacing every command with "sudo" gets in the way of getting your work done. Press to keep the current choice, or type selection number: There are 3 choices for the alternative editor (providing /usr/bin/editor). $ sudo update-alternatives -config editor This command will display a list of editors with the current one marked with an asterisk and allows you to select the one that you prefer. If the editor used by default is one that you’re not comfortable using, you can change it with this command: The /etc/sudoers file should always be modified using the visudo command because this command helps to keep you from causing configuration errors that might make the resultant file unusable (i.e., it can break sudo). Trick 3: Changing the default editor for the visudo command Just use the -u option with the sudo command and specify the username. While most people use sudo access to run commands as root, it also allows you to run commands as other users. Trick 2: Running commands as other users - not just root If you don’t want anyone to have this ability, don’t put anyone in the sudo (or admin) group on your system and this privilege level will not be implemented. The rest of the line allows members of this group to run any command as any user. The $sudo (or %admin) part of this line is a reference to the sudo (or admin) group. The privileges are derived through a line like this in the /etc/sudoers file: %sudo ALL=(ALL:ALL) ALL Assuming the standard /etc/sudoers setup, they should immediately be able to start using sudo commands once this change has been made.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |