2

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

brettnelson
  • 47
  • 1
  • 1
  • 5
  • see http://askubuntu.com/questions/66718/how-to-manage-users-and-groups and http://askubuntu.com/questions/70236/create-an-administrator-user-in-command-line – Takkat Feb 24 '14 at 20:10
  • What is the exact permission error and what program exactly issue it? sudoers has nothing to do with file permissions. – Braiam Feb 24 '14 at 20:19

2 Answers2

1

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 .

nux
  • 38,017
  • 35
  • 118
  • 131
1

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

brettnelson
  • 47
  • 1
  • 1
  • 5
  • 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 02 '16 at 06:55