Cd/home/user prompt does not exist, and you will be prompted when logging in:SU: Warning: Unable to change to/home/new2 directory: no file or directory-bash-4.2$Cause: No home directory is causing the home directory to be recreated, and thecp-r/etc/skel/. [^.] */home/new2-N: Do not create a group with the same name as the owner, and the Users group with ID 100 i
Copy Code code as follows:
NET User/add ABC *************/comment: "Description of this user"/expires:never
NET LOCALGROUP/ADD Administrators ABC adds ABC to the Administrators user group
NET localgroup
[GroupN
Or is that sudo and su?When you log in with Su, add the following-Because of this, the environment variable will become the switch user'sThis can cause unnecessary trouble if you do not use environment variables.General Sudo is not allowed for remote logins, because passwords are plaintext and are very insecureBut you can use ssh-t [email protected] sudo-l this way to log inOkay, I'm done.20161129l04-09 old boy Linux OPS training-linux system
Linux system is a multi-user multi-tasking time-sharing system, any user who wants to use system resources must first request an account from the system administrator. When using a Linux operating system, we typically run into multiple users.Like what:User account Add, delete, modifyManagement of user passwordsManageme
the system warns the userInactive: Indicates the number of days that the user name is not valid until the login is disabledExpire: Indicates when a user is forbidden to log onFlag: Reserved field, not used temporarily4. User group account files-group and GshadowLocated in/e
(to be represented by a timestamp)//data-d "1970-01-01 16066 Days"-date changed to timestampReserved Fieldsgroup information file/etc/groupformat-group nameGroup Password FlagGroup ID (GID)additional users in the groupgroup password file/etc/gshadowformat-group nameGroup PasswordGroup Administrator user nameadditional users in the group2.
: Group name: encrypted password: Group Manager: Group memberExplain:Group name: identification symbol for a groupEncrypted password: if "!!" is displayed, this group does not have a password.Group Manager: The right to add and remove users from this group.Members of a
actions:Syntax: GPASSWD group_namegpasswd [-A user_name1,...] [-M user_name2,...] Group_nameGPASSWD [-RR] Group_nameSet a password for a user group when no parameters are added-A: Specify the administrative user for the user group-M: adding
password"Command Example"Locked Ruant Account, unable to login with password# passwd-l RuanUnlock Ruan user's password lock# passwd-u Ruan4.gpasswd"Command function" Linux under Workgroup files /etc/group and/etc/gshadow的管理工具Command syntax gpasswd (options) (parameters)"Common Options"-A Add user to group-D Remove the
exclamation mark prohibit loginUsermod-l Zhou Lock user no login; add an exclamation markNo password can not unlock Usermod-u2)/etc/shadow:Login with NameUser password: generally with sha512 encryptionFrom January 1, 1970 to the time the password was last changedThe password can be changed in a few days (0 means it can be changed at any time)The password must be changed in a few days (99999 means never exp
User account and group account managementHere are some of the collation and instance configuration between the user account and the group account.The user and group accounts in the Linux system are divided into the following poin
directory to the new home directory;
-L,--login New_ LOGIN: Modify user name;-
S,--shell Shell: Modify user's default shell;-
L,--lock: Lock user password, i.e. add a "!" before the user's original password string. -
u,--unlock: Unlock user's password;
3) Userdel: Delete user-
r: Delete us
Article Title: user and group management in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. Understand the concept of single-user multi-task and multi-user multi-task in L
Tags: sof disable his exit user management security variable mod ShelCommands to learn in this section:User Management commands: USERADD,USERDEL,ID,FINGER,USERMOD,CHSH,CHFN,PASSWD,PWCK,Group Management commands: Groupadd,groupmod,groupdel,gpasswd,newgrp,chageSkills learned in this section:User Management commandsPassword management commandsGroup Management CommandsUser Management commands:Useradd, Userdel,
10:38 test3.txt# chown -R test:test testdir/ # ls -l testdirDrwxr-xr-x 2 test test 0 2009-10-23 10:38 testdir/# ls -lr testdirTotal 0-rw-r–r–1 test test 0 2009-10-23 10:38 test1.txt-rw-r–r–1 test test 0 2009-10-23 10:38 test2.txt-rw-r–r–1 test test 0 2009-10-23 10:38 test3.txt1 CHGRP Change the group to which the file or directory belongs① Use the man chgrp command to view CHGRP documentation in Linux.② command formatCHGRP [-Parameter options]
Next, let's continue. Here we describe the operations on user and group as follows:
6. Add a specified user to a specified group7. Obtain the owner of a specified group8. Add the current logon user to the specified
ignores character case,- T specify the delimiter,-K to sort the field after the delimiter,-N to sort by numeric size,-u sort to go back to weight): example cut-d:-f1-3/etc/passwd | Sort-nuf-t:-k3, Uniq deduplication tool (-D displays only duplicate rows,-u displays only non-repeating rows, and-c counts the number of occurrences), and TR replaces the specified characters with the corresponding characters: for example, replace all lowercase letters in the Inittab file with uppercase letters: TR '
Linux user and group management
I. Overview:
1. Three types of users in Linux:
(1) Super User (root) has all permissions of the operating system. The UID value is 0.
(2) general users have limited operating system permissions. UID value: 500 ~ 6000
(3) the pseudo-user is designed to facilitate system management and mee
Under the Linux operating system, how do I add a new user to a specific group? How do I add users to multiple groups at the same time? How do you move an existing user to a group or add
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.