A quick reminder on adding a user to the sudo file.
We want to use visudo as root to edit the /etc/sudoers file.
we add our user as follows;
username ALL=(ALL) ALL
If we need to create users or so, read on...
Firstly, if we need to add a new user and this can be done with;
adduser username
or
useradd username
the former being preferred.
[Optional]
Add user to sudo group
usermod -a -G groupname username
Example;
usermod -a -G sudo username
Note: groupadd groupname adds a new group, so;
groupadd sudo would add the group sudo.
Also, it is worth noting that in some(most cases), running;
usermod -a -G sudo username
is all that is required to add a user to sudoers.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.