1 Answers
How to Add a New User in UNIX:
Adding a new user in UNIX involves the following steps:
- Open a terminal window
- Log in as the root user or use the sudo command to gain root privileges
- Use the
useradd
command to create a new user. For example, to add a user named "john", you would type: - Create a password for the new user using the
passwd
command: - Follow the prompts to set a password for the new user
- Check that the new user has been successfully added by using the
grep
command to search the/etc/passwd
file: - Make any necessary adjustments to the new user's permissions or groups using commands like
usermod
anduseradd
sudo useradd john
sudo passwd john
grep john /etc/passwd
By following these steps, you can successfully add a new user in UNIX.
Please login or Register to submit your answer