I have activated root user in ubuntu and want to use ubuntu as server with no DE. For this I want to disable sudo privilege given to first user. How can I do this from command line ? I know I can use a GUI but how to do it from command line ?
|
|
The user in question has sudo privileges because it is in the Alternatively, you can remove the user from the admin group. If screen oriented For a "pure" command line solution, try
Below is my first answer before I realized there was a less dumb way to do it. If you'd like a more complicated way to do this, you can use Here's a quote from the
So you have to specify all the groups for the user except for
Finally, it violates the spirit of the question, but one could type |
||||
|
|
WarningCarefull, you can lock yourself out of our system this way! Always make sure, that the root-user retains his rights and you can access it. Keep a root terminal open beforehand so you can undo changes. Test settings in another terminal before closing your root-terminal! soduersAs described in another answer. Edit
Then change the line that says something similar to this:
to this:
Or delete the line, if you're sure, your root user account is enabled. groupThe default user is member of the 'admin' group. If you preferre it, you could just as well revoke the users membership to that group. Do that by following my last link or remove his name from the line
|
|||||
|