Wednesday, September 5, 2012

Easy learn linux command line- Part 7

http://www.php2s.com/wp-content/uploads/2011/12/terminal-logo-small.pngHi to All.we are grateful to begin new series of easy linux command line learning.
we learn how to configure user,s and groups in linux with terminal in this section, like: add a group,change your password, create new user and ... .






Users and Groups

Command Description
# chage -E 2005-12-31 user1 set deadline for user password   
# groupadd [group] create a new group   
# groupdel [group] delete a group   
# groupmod -n moon sun rename a group from moon to sun   
# grpck check correct syntax and file format of '/etc/group' and groups existence   
# newgrp - [group] log into a new group to change default group of newly created files   
# passwd change password   
# passwd user1 change a user password (only by root)   
# pwck check correct syntax and file format of '/etc/passwd' and users existence   
# useradd -c "User Linux" -g admin -d /home/user1 -s /bin/bash user1 create a new user "user1" belongs "admin" group   
# useradd user1 create a new user   
# userdel -r user1 delete a user ( '-r' eliminates home directory)   
# usermod -c "User FTP" -g system -d /ftp/user1 -s /bin/nologin user1 change user attributes   



No comments: