Do all this in Bash.
Obviously change the username laptop-admin
to whatever you like:
$ sudo adduser laptop-admin
Adding user `laptop-admin' ...
Adding new group `laptop-admin' (1022) ...
Adding new user `laptop-admin' (1022) with group `laptop-admin' ...
Creating home directory `/home/laptop-admin' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Type in a good, strong password (this account will have admin rights, after all).
Retype new UNIX password:
...and type it again.
passwd: password updated successfully
There are some more questions, but you can ignore these if you want (just press Enter).
Changing the user information for laptop-admin
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n]
Press enter to confirm it's all good.
The command to do this is much the same as the previous command (remembering to change the username laptop-admin
to whatever you used above), but with sudo
on the end.
$ sudo adduser laptop-admin sudo
Adding user `laptop-admin' to group `sudo' ...
Adding user laptop-admin to group sudo
Done.
Use this if, say, you had to create an account against your will but didn't want anyone logging into it...
$ sudo passwd -l laptop-admin
Note: On Ubuntu, this will show an incorrect password
error message instead of an account locked
error message, if the user tries to log in. I believe this is known as 'plausible deniability'.
$ sudo passwd -u laptop-admin
$ sudo deluser laptop-admin --remove-home
This should also remove the group, but you can try running the following just for completeness' sake.
$ sudo delgroup laptop-admin
I get the following:
The group `laptop-admin' does not exist.
You can also $ ls /home/
, which should show the user's home folder is absent.`