How To Create User Accounts in Unix
If you want to quickly create a new user account in your Unix OS, it ca be done with just one line
Adding new user accounts in Unix
To create a basic Unix user account with default settings, you need to know only one thing: the username.
The reason I say it as one word is because username (quite often referred to as “login”) is not the actual name of the new person gaining access to your Unix system, but rather a single keyword uniquely identifying this user in your system. Most often, usernames are derived from real names of users – jsmith, johns or smithj for John Smith, just to give you a few examples.
The simplest way to add a new user to your system is to do run a command like this:
If you don’t get any errors thrown back at you, this means your command was executed successfully and you now have a new user. Use this command to verify:
If you attempt to create a user with existing username, you’ll obviously get an error:
Once you have created new user, you’ll most likely need to have a new password assigned to it. Here’s how you do it:
As you can see from the example, you’ll be asked to type the new password twice, and it will be assigned to the user only if both inputs match.
See also
- How to list groups a user belongs to
- Find files which belong to a specific user
- Unix user management commands
- Unix commands
If you want to quickly create a new user account in your Unix OS, it ca be done with just one line
Adding new user accounts in Unix
To create a basic Unix user account with default settings, you need to know only one thing: the username.
The reason I say it as one word is because username (quite often referred to as “login”) is not the actual name of the new person gaining access to your Unix system, but rather a single keyword uniquely identifying this user in your system. Most often, usernames are derived from real names of users – jsmith, johns or smithj for John Smith, just to give you a few examples.
The simplest way to add a new user to your system is to do run a command like this:
If you don’t get any errors thrown back at you, this means your command was executed successfully and you now have a new user. Use this command to verify:
If you attempt to create a user with existing username, you’ll obviously get an error:
Once you have created new user, you’ll most likely need to have a new password assigned to it. Here’s how you do it:
As you can see from the example, you’ll be asked to type the new password twice, and it will be assigned to the user only if both inputs match.
See also
- How to list groups a user belongs to
- Find files which belong to a specific user
- Unix user management commands
- Unix commands