hans

hans

【Others】Creating a sudo privileged user in Ubuntu.


I'm tired of the copied and pasted strategies I found online, which involve modifying system files to grant sudo privileges. It's ridiculous. In fact, it can be done in just three steps.

First, log in to the system with a user account that has sudo privileges:

Run the following command:

sudo su

Then, run the following command:

adduser new_username

You will be prompted to set a password, but you can simply press Enter to skip filling in the specific information.

Finally, run the following command:

usermod -aG sudo new_username

And you're done!

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.