The liunx command chown is used to change the owner of a specified file to the specified user or group chown. the user can be a user name or user ID; A group can be a group name or
their names to uppercase and save them to the/tmp/etc.conf file.ls/etc/|Grep-e ". conf$" | tr [A-z] [a-z] >/tmp/etc.conf7. Displays the total number of sub-directories or files in the/var directory.[Email protected] var]# Ls-l |grep "^[d|-" | Wc-l178. Remove the names of the 10 groups with the smallest number of the third field in the/etc/group file.[[email protected] var]# sort-n-T ":"-K 3/etc/group |Head
User and group related files, Useradd1. User and group related files(1)/etc/passwdFormat: Name:passwd:UID:GID:GECOS:directory:shellZhubiao:x:1000:1000:zhubiao:/home/zhubiao:/bin/bash1 Name:user ' s login name2 passwd:x occupied, actually deposited in/etc/shadow3 uid:user ID, user
| Head | Cut-d:-f1RootBinDaemonSysAdmTtyDiskLpMemKmem
9. Merge the contents of the/etc/fstab and/etc/issue files into the same content and save them to the/tmp/etc.test file
[Root@localhost ~]# cat/etc/fstab >/tmp/etc.test[Root@localhost ~]# cat/etc/issue >>/tmp/etc.test10. User, Group Management class command practice
10.1 Create group Distro with a GID of 2
1. Create a CentOSMysql user group [root @ localhost ~] # Grepmysqletcgroup # If the user group mysql exists in the query system, add the user group if no user
Group PolicyIt is to modify the relevant configurations in the registry. The Group Policy uses its more comprehensive management organization method to manage and configure the settings in various objects, which is far more convenient and flexible than manually modifying the registry, more powerful. How to SetLocal Group PolicyDoes it take effect for specific use
useradd (option)-c-d-D: Change the preset value;-e-f-g-g-M: Automatically set up the user's log in directory;-M: Do not automatically set up the user's log in directory;-N: Cancels the creation of a group named after the user name;-R: Establish the system account number;-S: Specifies the shell to use when the user is logged in;-U: Specifies the
Tags:. com div user password host vim allow Linux Linu usersUser-related filesCreate User User1Each user is created, a message is added to the passwd filepasswd files: Storing user informationRoot:x:0:0:root:/root:/bin/bashUser name: Password placeholder (blank means no password): UID (
This article mainly summarizes common commands and options for Linux users and group management.
I. User Management
1. Add a user
Command: useradd
-U
UID, valid range: 0-65536
-G
GID, which must already exist
-G
GID, additional group, must exist
-C
Note
-D
1. View user list cat/etc/passwd can view a list of all users cat/etc/group view user groups Cat/etc/passwd|grep-v Nologin|grep-v halt integrated pipeline filtering, filtering Content1.5 User ActionsAdd User: useraddSet Password: passwd Delete
Group Policy user configuration management template Windows ComponentsWindows Update[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesWindowsUpdate]"DisableWindowsUpdateAccess" = dword: 00000001 (delete access using all Windows Update functions) (at least WINXP)Group Policy user configuration management t
Lists the user names of all logged-in users on the current system, note that the same user logs on multiple times, only once~]# who | Cut-d '-f1 | Sort | UniqLists information about the last user logged on to the current system.~]# Last | Head-1Lists the shell on the current system that the user treats as their default
) +Interactive Login
GroupLinux Group: Groupname/gidAdministrators group: root, 0Normal Group:System groups: 1-499, 1-999General Group: 1000+,Primary group of users (primary group):The user must belong to one and only one primar
Useradd[options] USERNAME- u UID Specify user ID , greater than -- G GID ( Basic Group ), group must exist- G GID , ...,... ( Additional group, can have multiple )- C "COMMENT" Comment Information- D /path/to/somedirectory Specify home directory -s/bin/bash specify shell path SHELL environment variable E
The main commands are:Group: Groupadd, Groupmod, GroupdelUsers: Useradd, Usermod, UserdelCertification: passwdGroup Resolution library File:/etc/groupGrpname:x:gid:user1, User2, ...Group name: Password dot: GID: A list of users with this group as additional groups, separated by commasGroupadd command: Adding a groupGroupadd [Options] Group-G GID: indicates GID;-R
We all know that to log on to the Linux operating system, we have to have a username and password. Each user is identified by a unique identity called the user ID. Each user in the system is also required to belong to at least one user group. Similarly,
Public Platform Development User Group Management Group Management Interface Query Grouping create Group modify group name Move User Group
Author: Fang Times studio
Address: http://www.
Job One:1) New user Natasha,uid is 1000,gid to 555, note information is "master"2) Modify Natasha user's home directory for/natasha3) View the last line of the user information profile4) Set the password "123" for the Natasha user5) View the last line of the user's password profile6) Lock The Natasha user account7) Unlock The Natasha
user profile and password configuration filesUser Profile/etc/passwd divided into 7 fields: ① User name ② account password/etc/shadow file ③ user identification number Uid④ Group identification number Gid⑤ Comment Description ⑥ user home directory ⑦ user's shell,/sbin/nologi
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.