Difference between revisions of "En:Managing Users"

From Sabayon Wiki
Jump to: navigation, search
m (Group Management - italic)
 
Line 41: Line 41:
 
{{Console|<pre class="clear">groups</pre>}}
 
{{Console|<pre class="clear">groups</pre>}}
  
Lists ``groups`` of the logged user.
+
Lists ''groups'' of the logged user.
  
 
=== Create a new group ===
 
=== Create a new group ===

Latest revision as of 19:43, 13 April 2013

i18n: de en

User Management

Procedure to create a new user

Open a terminal and login as root. Then enter the following commands:

# useradd -G audio, cdrom, video, games, cdrw, users, netdev, entropy, portage, plugdev, pulse -m new_user_name
# passwd new_user_name
  • where the option -G show all groups of the new user,
  • with the -m option creates the /home/new_user_name.
  • and the second line introduce the password for the new user.

For more information:

# man useradd 
# man passwd

Procedure to delete a user (Use with Caution!)

Open a terminal and login as root. Then enter the following command:

# userdel -r user_name

to delete the user user_name and his/her home directory (option -r).

For more information:

# man userdel

Group Management

You can find all groups in /etc/group - syntax is

group_name:password:group_id:users_in_this_group

whereby x indicates, that there is no password set and users_in_this_group is a comma separated list.

Each line lists a group. group_id 0 is always root. Numbers in range 1-999 lists services and then follow users.

List the groups the current user is into

groups

Lists groups of the logged user.

Create a new group

# groupadd groupname

Creates groupname.

Add a user to an existing group

# usermod -a -G groupname username

Adds username to groupname.

Delete a group

# groupdel groupname

Removes groupname.