5
0
I am a Linux Newbie, just learning it and using Debian 7.0 Wheezy. I have seen two methods to allow user to use sudo
One is to use visudo
to modify /etc/sudoers
and add following
username ALL=(ALL) ALL
Another is adding user to sudo
group, using this
usermod -a -G sudo username
Are both method have same impact? Is there any pros and cons of each method?
Generally speaking, it is better practice to have a separate user group for admins - but not in the
sudo
group, such as this case. Invisudo
you could do%wheel ALL=(ALL) ALL
and add the user to thewheel
group instead (or whatever group you decide). I like the question and am curious what replies you will get. – nerdwaller – 2013-07-11T14:26:30.9832Using a group dedicated for sudo access allows other users to easily see that this user is an administrator - you don't get that by putting the username into sudoers, which is readable only by root. – Xenopathic – 2013-07-11T22:32:57.647