1

I have an ubuntu account but i do not have sudo access, I did try sudo usermod -a -G username to give me sudo access but I am getting username is not a sudoer file, this will be reported. To get a sudo access to an existing account what do I need to do ?

pl_rock
  • 11,715
Chauhan
  • 11

1 Answers1

3

login with root user using

 su - root 

then run command

usermod -a -G sudo username

or

run command visudo and paste

username ALL=(ALL) ALL

if still you face problem then run command

 mount -o rw,remount /

and try again above method

also, you are saying. you able to run command

sudo adduser chauhan sudo 

then you can do this way also

su - chauhan
sudo usermod -a -G sudo username
pl_rock
  • 11,715