Changes

Jump to navigation Jump to search
no edit summary
First create the users group, checking the last group number:
$ cat /etc/group $ /usr/sbin/groupadd -g 515 username
Then add the user
$ /usr/sbin/useradd -g username -G root -s /bin/bash -p xxxx -d /home/username -m username
where g is the primary group, G is other groups, p sets a password,
d declares a home directory and m makes the directory
Change the user's password:
$ passwd username
And add the user to the sudoers file
$ echo 'username ALL=(ALL) ALL' >> /etc/sudoers
To delete a user:
$ /usr/sbin/userdel -r roger where r removes the home directory
And to remove their group
$ /usr/sbin/groupdel username
Anonymous user

Navigation menu