sexta-feira, março 09, 2012

Manage User and Group

Create de account maykon, -m create home directory, -s shell
#useradd -m maykon -s /bin/bash

Modify user account, -L Lock password, -U Unlock.
#usermod -L maykon

Delete account, -r delete home directory.
#usedel -r maykon

Add group to the system.
# groupadd centipede

Modify group, change name centipede for centipede2
#groupmod -n centipede2 centipede

Delete group
#groupdel centipede2

Set password
#passwd user

Command is used to administer groups, add root for group centipede
#gpasswd -a root centipede

User\Group account and Password Files:

#/etc/passwd – Username, Password (hashed), User ID, Group ID, Full Name, Home Directory, Default Shell.

#/etc/group – Group Name, Group Password, Group ID, Group Member List.

#/etc/shadow – Shadow is a file which contains the password information for the system's.

#/etc/gshadow - file is readable only by the root user and contains an encrypted password for each group.

Nenhum comentário: