1 Job One:21The new user natasha,uid to 1000,gid is 555, and the note information is "master"3Groupadd-g 555Natasha4Useradd-u 1000-g 555-C Master Natasha5 ID Natasha6 72) Modify Natasha User's home directory to/Natasha8USERMOD-MD/Natasha Natasha9 Ten3) View the last line of the user Information profile OneTail-1/etc/Passwdtai A -4) Set the password for the Natasha user "123" -Echo'123'| passwd--stdin Natasha the -5) View the last line of the user's password profile -Tail-1/etc/Shadow - +6) Lock the Natasha user account -Usermod-L Natasha + A7) Unlock the Natasha user account atUsermod-U Natasha - -8) New group Police,gid to 1999 -Groupadd-g 1999Police - -9) View the last line of the group configuration file inTail-1/etc/Group - to10) Add the Natasha user to the police group +Usermod Natasha-a-G Police - the11) Modify the group name of the police group to Jingcha *Groupmod-N Jingcha Police $ Panax Notoginseng12Delete the Natasha user, and delete the home directory and the mailbox together -Userdel-R Natasha the +13) Delete Jingcha Group A Groudel Jingcha the + Job Two: -1Create a directory test in the user's home directory, enter test to create an empty file File1 $mkdir/test/ $CD/Test - Touch File1 - the2) displays file information in a long format, noting the permissions of the file and the user and group to which it belongs -LS-l FILE1Wuyi the3set permissions for the file File1 so that other users can write to the file. -chmod o=R file1 Wu -4) View Settings results AboutLS-l FILE1 $ -5) cancels the Read permission for the file file1 with the same group of users and views the setting results. -chmod gR file1 -LS-l FILE1 A +6set permissions for file files in numeric notation, all readable, writable, and executable, and the owning group user and other users have only read and execute permissions. Review the setup results when the settings are complete. thechmod 755file1 -LS-L Filel $ the7Change the permissions of the file file1 in numeric form so that the owner can only read the file. No other user has permission. View the settings results. thechmod 400file1 theLS-L Filel the -8) go back to the upper directory to view the test permissions in CD.. thell-d/Test the About9) to add write permissions to this directory for other users theChmod-r 0+w/test
Linux Basic series: Common Commands (2)