I was trying to extract a web template into the hosting folder /docroot on the web service, which is working, however I do not have permission to complete the action.

I cannot stand being locked out of anything on a machine, and before you all go on a rant about why the root account is locked yadda yadda , dont, just dont.

So... did a sudo visudo

# User privilege specification
root    ALL=(ALL:ALL) ALL
username   ALL=(ALL:ALL) ALL

saved as tmp and then as sudoers , checked the files, both sudoers and sudoers.tmp same size

Still no joy, cannot access required folders and files. Rebooted, no go

I was about to start editing the passwd files next, but thought I best ask what might be going on here as I am not entirely familiar with Ubuntu 13.10 desktop and Unity.

This is not a production machine, only experimenting with web services and the available web production tools. I get the root account is locked and sudo 'ing every command from the command line is not an option, just aggro.

If anyone can offer a (even if unsecured) solution to this permissions issue I would be very grateful. I do not care about breakage, please do not lecture, I can re-image this unit in less than 20 min.

I tried adding my account to the admin group as well, only to get an error saying the admin group doesn't exist.

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

huh? Yep, confused. TIA

marked as duplicate by Takkat, kiri, karel, Florian Diesch, Maythux Mar 3 '14 at 6:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Its Not recommended to add users to root group .

sudo usermod -aG (nameofgroup) (nameofuser) 

the user will be a member of the group .

You can use chown to give the user the owenership :

sudo chown username:usergroup /path -R 

-R means recursive so user well be the owner also of subfolders .

Now you can give the user who owned this directory a full access by :

sudo chmod 755 /path 

755 means (drwxr-xr-x) read write execute permissions for the owner .

  • [sudo useradd -G admin username]..... useradd: group 'admin' does not exist – brettnelson Feb 24 '14 at 20:09
  • I would be inclined to change the ownership on the entire drive, but do not know what that would do to the apps/services – brettnelson Feb 24 '14 at 20:12
  • There is no admin in 13.10 - you may by looking for group sudo. – Takkat Feb 24 '14 at 20:12
  • useradd -G root username – nux Feb 24 '14 at 20:12
  • its not recommended man – nux Feb 24 '14 at 20:12

So after chowning i was able to modify what i needed, however this seems to have created some other issues with installed packages, or possibly more likely the several attempts to modify group permissions etc caused issues, so reimaged the unit and did the following...

How to enable root login?

Provided you are not concerned about security I feel this the the best solution. The other solutions SHOULD have worked, but didnt so I can only assume its due to much buggering on the part of ubuntu.

Thanks for those who offered guidance.

Note to Ubuntu, if I wanted to be locked out of my system I would buy a mac

  • An old topic I know, but I'm having the same problem as you, and have been racking my brain as to what's going on. Ubuntu 16.04 LTS. I'm going with enabling root login, as silly as it seems. – rosscova Aug 2 '16 at 6:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.