In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Today, the editor will bring you an article about the permissions of Linux groups and users. The editor thinks it is very practical, so I will share it for you as a reference. Let's follow the editor and have a look.
1. Display / etc directory, starting with a non-letter, followed by a letter and other files or directories of any length and any character.
Ls / etc/ [^ [: alpha:]] [[: alpha:]]
2. Copy all files or directories that begin with p and end with non-numbers under the / etc directory to the / tmp/mytest1 directory.
Cp-r / etc/p [^ [: digit:]] / tmp/mytest1
3. Convert the contents of the / etc/issue file to uppercase and save to the / tmp/issue.out file.
Cat / etc/issue | tr "amurz"Amurz" > / tmp/issue.out
4. Summarize and describe how to use user and group management commands and complete the following exercises:
(1) create a group distro with a GID of 2019
Groupadd-g 2019 distro
(2) create a user mandriva with an ID of 1005 and a basic group of distro
Useradd-u 1005 mandriva-g distro
(3) create user mageia, whose ID number is 1100 and home directory is / home/linux
Mkdir / home/linux/
Useradd-u 1100 mageia-d / home/linux/
(4) add a password to the user mageia, the password is mageedu, and set the user password to expire after 7 days.
Passwd mageia
Enter password: mageedu
Chage-M 7 mageia
Chage-l mageia: view the modified result
(5) delete mandriva, but keep its home directory.
Userdel mandriva
(6) create user slackware, whose ID number is 2002, basic group is distro, and additional group peguin
Groupadd peguin
Useradd-u 2002 slackware-g distro-G peguin
(7) modify the default shell of slackware to / bin/tcsh
Usermod-s / bin/tcsh slackware
(8) add additional group admins for user slackware
Groupadd / admins
Usermod-a-G admins slackware
These are the details of the permissions of the Linux group and users. have you gained anything after reading it? If you want to know more about it, you are welcome to follow the industry information!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.