Ubuntu: Sudo access for an existing acount


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 ?


login with root user using

 su - root   

then run command

usermod -a -G sudo username  


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  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »