o create a new user in Ubuntu with a password and grant them all permissions (including administrative privileges), follow these steps:
1. Create a New User
Run the following command, replacing username
with your desired username:
- You will be prompted to enter a password and some optional details.
2. Add User to the Sudo Group
To grant full administrative permissions, add the user to the sudo
group:
- This allows the user to execute commands as root using
sudo
.
3. Verify the User’s Permissions
Switch to the new user:
Then check if the user can run sudo
commands:
If it returns root
, the user has full administrative access.
4. (Optional) Grant Passwordless Sudo Access
If you want the user to execute sudo
commands without entering a password:
Now the user has full administrative privileges.
No comments:
Post a Comment