0

By mistake and lack of knowledge I tried to change the current user to root privilege by typing the command I useradd -m -G root user3 Now I am neither able to access this user as a root user nor a sudo user. When I type sudo apt-get update, I get the response user is not in the sudoers file. and when I try to run apt-get update , I get a permission denied response

P.S: I am running my ubuntu in a mac mini

1 Answers1

0

The correct way to give superuser permissions in Ubuntu is adding yourself to the sudo group, or manually editing the sudoers file using visudo, which has all the bells and whistles to prevent you from locking yourself out. See this page and this page on the Ubuntu Wiki for more details.

wyphan
  • 337