Linux account management and ACL permissions settings

Source: Internet
Author: User

first, Linux users and user groups
1. The Linux user account is located in the/etc/passwd password located in/etc/shadow
User group account is located in the/etc/group password located in/etc/gshadow
2. Groups: View valid user groups and support user groups enter commands directly groups
The first output user group is a valid user group
3. NEWGRP: Switch NEWGRP user Group for effective user group

second, account management (System administrator)
1, Useradd: Add account User [u UID] [-G initial user Group] [-G secondary user group] [-mm] [-C description document] [-D main file absolute path] [-s shell] user account name
2, passwd: Set the password passwd [-l] [-u] [–stdin] [-S] [-N days] [-X days] [-W days] [-I date] Account
3, Chage: Display or modify the account password Chage [-LDEIMMW] account name
-L: Lists the detailed password parameters for this account
4, Usermod: Account modification Usermod [-cdegglsulu] Username
5. Userdel: Delete User Userdel [-r] Username
-R: Along with the user's main file is also deleted

third, the user function
1, finger: Check user information finger [-s] Username
S: Lists only the user's account number, full name, terminal code and login time
2. CHFN: Set account properties Chfn [-foph] Account
3, ID: Query Uid/gid and other information ID account

Iv. New and deleted user groups (System administrator)
1, Groupadd: Add user group Groupadd [-G GID] [-r] User group name
-G: followed by a specific GID to give directly to a GID
-r: New user Group
2, Groupmod: Modify user group Parameters Groupmod [-G GID] [-n group_name] User group name-G: Modify Gid-n: Modify existing user groups
3. Groupdel: Delete user group Groupdel [user group name]
4, GPASSWD: User group administrator function gpasswd [-A user] GroupName
-A: GroupName master control to face and face users

v. Use of ACLS
1.getfacl: Get ACL Settings item for a file/directory (permission condition)
Getfacl filename
2.setfacl: Set ACL rules for a file/directory
Setfacl [-BKRD] [-m|-x] filename
Eg:setfacl-m G:mygroup:rx doc.txt set up user groups
Eg:setfacl-m u:myuser:rwx doc.txt Setting up users

Six, user identity switch
1, su: simple identity switch su [-LM] [-C command] [username]
2, sudo su input their own account password can switch to the root account exit

vii. User Information transfer on Linux hosts
1, w,who,last,lastlog: query user Information
2, write: User to talk about write user account [user is in the terminal interface]
3, Mail: User email Maill [email protected]-S "Mail title"
If it is sent to the user on the computer, basically even "@localhost" do not have to write
4, Pwck: Check the/ETC/PASSWD account profile information

Linux account management and ACL permissions settings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.