Manage users and groups

From NewbieDOC


Chris Lale
chrislale AT users DOT berlios DOT de

Go to NewbieDOC index

Revision History


Revsion 1.0 31st January 2006 Revised by Chris Lale
Initial release.

Revsion 1.1 22nd November 2007 Revised by Chris Lale
Modified to include Revision History, Abstract and Appendix for Licence, so that a stable version can be included in the "newbiedoc" package.

Revsion 1.2 26th September 2009 Revised by Chris Lale
Updated for Debian Squeeze.


Image:Newbiedoc-32.png Stable document
You can comment on this document by clicking on the discussion tab.

You can edit the live version of this document: Manage users and groups


Abstract

Brief newbie help about how to manage users and groups in Debian using Gnome, KDE, generic desktop and commandline tools.


Contents


1 Gnome desktop

You must install the gnome-system-tools package in order to manage users and groups in Gnome. Once installed, the Users and Groups menu item is available from the System menu.

  • System -> Administration -> Users and Groups

You will need the root password. The main Users Settings window shows a list of users. In order to to supply the root password you must click the Unlock button.

Unlock -> Password for root -> Authenticate

Operations are carried out by selecting items and clicking on buttons.

1.1 Users Settings

There are four buttons available:

  • Add User
  • Properties
  • Delete
  • Manage Groups

1.1.1 Add User

Account tab
Basic Settings
Username:
Real Name:
Contact Information (optional)
Password
Set password by hand
Generate random password
User Privileges tab
Advanced tab
Advanced Settings
Shell:
Home directory:
Main group:
User ID:

1.2 Manage Groups

The Add Group button is available at any time. The other buttons are greyed out unless a group is selected first. The buttons are

  • Add Group
  • Properties
  • Delete

1.2.1 Add Group/Properties dialogue

Group Name:
Group ID:
Group members:

2 KDE desktop

 
Note
Note: 
The following applies to Etch but may vary in Squeeze.
 
  • KDE Main Menu -> System -> User Manager

You will need the root password. There are two tabbed windows - one to manage users and one to manage groups. Operations are selected from the User menu and the Group menu.

2.1 Users tab

Menu operations available include

  • User -> Add
  • User -> Edit
  • User -> Delete
  • User -> Set Password

2.1.1 User Add/Edit dialogue

User Info
User login:
Set Password...
User ID:
Full name:
Login shell:
Home folder:
(optional contact information)
Account disabled
Password Management
Groups
Groups
Set as primary
Account disabled

2.2 Groups tab

Menu operations available include

  • Group -> Add
  • Group -> Edit
  • Group -> Delete

2.2.1 Group Add/Edit dialogue

Group number:
Group name:
Users in group: Remove
Users NOT in group: Add


3 Any window manager (generic)

You can use either of the above tools by installing the gnome-system-tools package (Gnome tool) or the kuser package (KDE tool). Each package will also install all the relevant libraries, but not the whole desktop.

Alternatively, you can install the webmin package available from http://prdownloads.sourceforge.net/webadmin/webmin_1.490_all.deb. You can install the downloaded package using dpkg.

$ su
(enter root password)

# dpkg -i name-of-package.deb
# exit
$

Accept the defaults during installation. You will then need the root password to access webmin.

3.1 Run Webmin

 
Note
Note: 
The details outlined below may vary in the latest version of webmin.
 

Open a browser and visit this URL:

https://localhost:10000/

Log into webmin using the root username and password.

3.2 Manage users and groups

Click on the System tab and then Users and Groups.

System tab
Users and Groups

3.2.1 Create or delete

There are two tables - Local Users and Local Groups. At the top of each table there is a link that enables you to create new users or groups. Each entry in a table has a checklist box that enables you to select user(s) or group(s). There is a button at the bottom of each table that allows you to delete selected users or groups.

3.2.2 Edit

Each user or group has a link that enables you to edit details

User Details
Username
User ID
Real name
Home directory
Shell
Password
Password Options
Group Membership
Primary groups
Secondary groups

4 Commandline

Run these commands from a terminal or a terminal window as root. Read the man pages first. Eg to read the manual for adduser:

$ man adduser
adduser
add a new user
usermod
modify a user's details
deluser
delete a user
chfn
change a user's full name
chsh
change a user's shell
passwd
change a user's password
chage
change how or when a user's password expires
groups
displays the groups of a specified user
addgroup
add a new group
groupmod
modify a group's details
delgroup
delete a group

4.1 Examples

4.1.1 Add a user

# adduser junk
Adding user `junk'...
Adding new group `junk' (1005).
Adding new user `junk' (1005) with group `junk'.
Creating home directory `/home/junk'.
Copying files from `/etc/skel'
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for junk
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] y
#

4.1.2 Delete a user

# deluser
Enter a username to remove: junk
Removing user `junk'...
done.
#


5 Appendix A: Licence

Copyright (c) 2006-2009 Chris Lale. chrislale AT users DOT berlios DOT de

GNU FDL Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License."

Go to NewbieDOC index

Content is available under GNU Free Documentation License 1.2, unless otherwise stated.