/etc/passwd vs /etc/sudoers **add user to super user**
by andrewysk from LinuxQuestions.org on (#5MVD0)
Please tell me what is the different resultant between these 2 :
Code:# usermod -aG sudo <user_name>This one is add username to sudo group , which is in "/etc/passwd"
Code:#echo 'myfancyusername ALL=(ALL) ALL' >> /etc/sudoersThis one is add the line above to "/etc/sudoers"..
What's the resultant difference ?
When to use which ?
Thanks
Code:# usermod -aG sudo <user_name>This one is add username to sudo group , which is in "/etc/passwd"
Code:#echo 'myfancyusername ALL=(ALL) ALL' >> /etc/sudoersThis one is add the line above to "/etc/sudoers"..
What's the resultant difference ?
When to use which ?
Thanks