Related exercises for Linux user and Group management commands:
1, create a user Mandriva, whose ID number is 2002, the basic Group is distro (group ID 3003),
The attachment group is Linux:
#groupadd-G 3003 distro
#groupadd Linux
#useradd-u 2002-g 3003-g linux Mandriva
2, create a user fedora, whose full name is Fedora Community, the default shell is tcsh;
#useradd-C "Fedora Community"-s/bin/tcsh Fedora
3, the change Mandriva ID number is 4004, the basic group is Linux, the attachment group is distro and fedora;
#usermod-u 4004-g linux-g distro,fedora Mandriva
4, to the Fedora password, and set its minimum password period of 2 days, the maximum period of 50 days
#passwd-N 2-x Fedora
5. Change the default shell of Mandriva to/bin/bash;
#usermod-S/bin/bash mandriva
6, add the system user HBase, and do not allow login system;
#useradd-R-s/sbin/nologin hbase
This article is from the "Learn Linux history" blog, please be sure to keep this source http://woyaoxuelinux.blog.51cto.com/5663865/1861455
Linux Basic exercise: User and group management related exercises