Cac Lenh Ca ban trong CentOS 6 Posted by admin On April 21, 2014 5 Comments l.useradd - Lenh tao User hoac chinh siia thong tin User. Cu phap useradd <user name> Cac lenh tuy chon voi useradd -s the login shell for the new user account # useradd -s /sbin/nologin user -d home directory for the new user account # useradd -d /home/user user -g force use GROUP for the new user account # useradd -g group user phan 1 -e set account expiration date to EXPIRE_DAT -u force use the UID for the new user account # useradd
32
Embed
Các Lệnh Cơ Bản Trong CentOS 6 – Phần 1 _ Kiến Thức Công Nghệ, Thủ Thuật Máy Tính
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Cac Lenh Ca ban trong CentOS 6
Posted by admin On April 21, 2014 5 Comments
l.useradd - Lenh tao User hoac chinh siia thong tin User.
Cu phap useradd <user name>
Cac lenh tuy chon voi useradd
-s the login shell for the new user account
# useradd -s /sbin/nologin user
-d home directory for the new user account
# useradd -d /home/user user
-g force use GROUP for the new user account
# useradd -g group user
phan 1-e set account expiration date to EXPIRE_DAT
-uforce use the UID for the new user account # useradd
-u 550 user
-mcreate home directory for the new user account #
useradd -m user
-Mdo not create user's home directory(overrides
/etc/login.defs) # useradd -M user
2. passwd - dung d§ tao password chfrng th^c cho user
Cu phap passwd<usernam>
Cac len tuy chon voi passwd
This is a quick way to disable a password for
an account # passwd -d user
This option is used to lock the specified account and it is
available to root only # passwd -l user
This is the reverse of the -l option - it will unlock the account password by removing the ! prefix
# passwd -u user
This will set the maximum password lifetime, in days, if the user's account supports password life-times
# passwd -x 10 user
This will set the minimum password lifetime, in days, if the user's account supports password life-times. Available to root only
# passwd -n 10 user
This will set the number of days which will pass before an expired password for this account will be taken to mean that the account is inactive and should be disabled, if the user's account supports pass-word lifetimes
# passwd -i 10 user
-w This will set the number of days in advance the user will begin receiving
warnings that her password will expire, if the user's account supports password lifetimes
# passwd -w 10 user
-S This will output a short information about the status of the password for a