0

Is it possible to create a sudo user who has exact privileges of a root user ? If so can you guide me through how to create one using cmd.

Ex: I have created a sudo user who can't restart for some reason. He can always do sudo -i and then restart, but is there some other way which makes the user by default have all the permissions.

I know it's vulnerable but since it runs on local network it's fine.

1 Answers1

0

Create a user, let's call him myuser, grant myuser the same privileges as root and set a password for this account:

$ sudo useradd -ou 0 -g 0 myuser
$ sudo passwd myuser

If you have already had a user myuser and you want to grant him root privileges (make him a second root user):

$ grep myuser /etc/passwd
myuser:x:1001:1001::/home/myuser:/bin/bash

For this, it is required to edit the file /etc/passwd and just change UID and GID to 0.

galoget
  • 3,023