␡
- Starting Up the Terminal
- Moving around the Filesystem
- Manipulating Files and Folders
- System Information Commands
- Searching and Editing Text Files
- Dealing with Users and Groups
- Getting Help on the Command Line
- Searching for Man Files
- Using Wildcards
- Executing Multiple Commands
- Moving on to More Advanced Uses of the Command Line
This chapter is from the book
Dealing with Users and Groups
You can use the following commands to administer users and groups:
- adduser: The adduser command will create a new user. To simply create a new user, type sudo adduser $loginname. This will create the user's home directory and default group. It will prompt for a user password and then further details about the user.
- passwd: The passwd command will change the user's password. If simply run by a regular user, it will change his password. If run using sudo, it can change any user's password. For example, sudo passwd joe will change Joe's password.
- who: The who command will tell you who is currently logged into the machine.
- addgroup: The addgroup command will add a new group. To create a new group, type sudo addgroup $groupname.
- deluser: The deluser command will remove a user from the system. To remove their files and home directory, you need to add the -remove-home option
- delgroup: The delgroup command will remove a group from the system. You cannot remove a group that is the primary group of any users.