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.



The Official Ubuntu Book
The Official Ubuntu Book
ISBN: 0132435942
EAN: 2147483647
Year: 2006
Pages: 133

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net