# chage -E 2005-12-31 user1
set deadline for user password
# groupadd [group-name]
create a new group
# groupdel [group-name]
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-name]
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:
Post a Comment