- useradd Command in Linux
- 1. Create a basic user
- 2. To assign a new user's home directory path
- 3. Create a user with a unique id.
- 4. Make a user with a unique group id.
- 5. To establish a user without a home directory.
- 6. Make a user with an expiration date.
- 7. To create a user with a comment
- 8. To provide the user an unencrypted password
- 9. Create a user with a different login shell.
- 10. To display help
- Conclusion
Linux is a multi-user operating system kernel that allows multiple users to operate on the same machine. For this to happen, we need some way to add newly authenticated users to the system. useradd is the Linux command line utility that allows us to do this task.
In this article, we will discuss various examples and options of the useradd command.
useradd Command in Linux
In Linux, the useradd command is used to add user accounts to your system. It's merely a symbolic link to the Linux adduser command; the only difference is that useradd is a native binary compiled with the system, whereas adduser is a Perl script that utilizes the useradd binary in the background.
The syntax for this command is
1. Create a basic user
2. To assign a new user's home directory path
3. Create a user with a unique id.
4. Make a user with a unique group id.
5. To establish a user without a home directory.
6. Make a user with an expiration date.
7. To create a user with a comment
8. To provide the user an unencrypted password
9. Create a user with a different login shell.
10. To display help
Conclusion
In this article, we went through various options related to the useradd command in Linux. We saw how this command line utility could be used to create passwords for users, create users with expiration dates, create users with unique IDs, get command manuals, etc.
People are also reading:
Leave a Comment on this Post