Skip to main content
SUSE

Lesson 8 Manage Delegation with SUDO

By October 2, 2013September 12th, 2022No Comments



Now that we have “many users”; we may need to delegate some tasks with SUDO. Really, we should all use SUDO more. Even if you are the single administrator of a machine; sudo is still a better way than to use su. The temptation is with su that you stay logged in as root even after you have done what is required. There is a way around this is su -c but really you are not going to use it, I just know.

Using sudo will allow us to delegate some or all tasks to suers and is controlled vi /etc/sudoers file. We can delegate to suers or groups, groups would have the % symbol to preface them, %users. If groups do not suit then we can creat user aliases:

User_Alias ADMINS = geeko, fred 
ADMINS ALL = (root) ALL, !/usr/bin/passwd root

Here we create a user alias called ADMINS that contains geeko and fred, then assign ADMINS the permissions to sudo as root from all computers and run all command except changing the root password.