FreeBSD 13.2 adduser: Difference between revisions
Created page with "==Adduser== ===Basic Example=== If you haven't already, open a terminal window. Run '''adduser''' as a superuser: To create a new user, you'll need to have '''root''' privileges. Use the '''sudo''' command run '''adduser''' as a superuser: <code>sudo adduser</code> This will start the interactive user creation process. ====Enter the new user's information==== Follow the prompts to enter information about the new user named 'noob'. The important fields to fill ou..." |
(No difference)
|
Latest revision as of 14:56, 5 May 2023
Adduser
Basic Example
If you haven't already, open a terminal window.
Run adduser as a superuser:
To create a new user, you'll need to have root privileges. Use the sudo command run adduser as a superuser:
sudo adduser
This will start the interactive user creation process.
Enter the new user's information
Follow the prompts to enter information about the new user named 'noob'. The important fields to fill out are:
- Username: noob
- Full name: (You can enter any full name, e.g., Noob Newbie)
- Uid: (Leave this blank for the system to assign one automatically)
- Login group: noob
- Login group is: noob
- Invite noob into other groups?: (Press 'Enter' to accept the default "no")
- Login class: (Press 'Enter' to accept the default "default")
- Shell: (Press 'Enter' to accept the default "/bin/sh", or choose another shell like "/bin/csh" or "/bin/tcsh")
- Home directory: (Press 'Enter' to accept the default "/home/noob")
- Home directory permissions: (Press 'Enter' to accept the default "755")
- Use password-based authentication?: (Press 'Enter' to accept the default "yes")
- Use an empty password?: (Press 'Enter' to accept the default "no")
- Use a random password?: (Press 'Enter' to accept the default "no")
- Enter password: (Type a secure password for the 'noob' user and press 'Enter')
- Enter password again: (Confirm the password by typing it again and pressing 'Enter')
- Lock out the account after creation?: (Press 'Enter' to accept the default "no")
Confirm the new user's information
After entering all the required information, adduser will display a summary of the new user's settings. Review the information to ensure it is correct, then type yes and press Enter to confirm and create the new user.
Verify the new user
To verify that the new user noob was created successfully, you can check the contents of the /etc/passwd file by running:
grep noob /etc/passwd
This command should display a line containing the new user's information, such as:
noob:*:1001:1001:Noob Newbie:/home/noob:/bin/sh
Congratulations! You've successfully added a new user named noob to your FreeBSD system using the adduser command. The new user can now log in and start exploring the system.