Administrators use the useradd Bash command to create new user accounts. This is also the command you would use to make changes to account information. Like all bash commands, there are many line options to learn that will allow you to do many different things.
Use Useradd to Create New User Accounts
Step1 Use '-c' for the comment field.
Step2 Use '-d' for the directory. The ID user is typically given as the name of the directory.
Step3 Use '-e' to set the date of the account's expiration. A unique value is calculated that is the time since the epoch, which means since the first of January, 1970. This is more for the computer's use, not human use, since the average person would not be able to look at a large number and recognize it as a time and date marker. Human users are more interested in the month/date/year identifier. The format for this is almost always MM/DD/YYYY.
Step4 Use '-f' to disable accounts. Once an account password expires, the '-f' command will permanently disable it. Depending on the nature of your organization, you may not utilize this command. It can be negated by entering in a value of -1.
Step5 Use '-g' to separate new user accounts into groups. This useradd function will assign a name and ID number to groups.
Step6 Use '-k' for directory purposes. You can move default information to the home directory of a specific user.
Step7 Use '-m' for directory creation. When you use useradd to create new user accounts, you'll want to create a home directory for each individual.
Step8 Use '-u' to create a unique number ID for each new user.
Step9 Use '-s' for the login shell.
Step10 Set default items to be displayed using '-D'. Options for display are '-d', '-e', '-f', '-g' and '-s'.
Step11 The use of shadow passwords for many of these items is required. To learn which items require shadow passwords and how to use shadow passwords, consult the O'Reilly Linux DevCenter online (see Resources below).
Step12 Use '-r' if you want to create an account with a password that will never expire. You would typically not create a home directory for this type of system account.
How to Use Useradd to Create New User Accounts
tags: Linux | author: chaoPosts Relacionados:
Subscribe to:
Post Comments (Atom)
0 comment:
Post a Comment