How to add my user account to admin group (13.10 desktop)
Solution 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 .
Solution 2
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...
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
Related videos on Youtube
brettnelson
Updated on September 18, 2022Comments
-
brettnelson over 1 year
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
-
Takkat about 10 years
-
Braiam about 10 yearsWhat is the exact permission error and what program exactly issue it? sudoers has nothing to do with file permissions.
-
-
brettnelson about 10 years[sudo useradd -G admin username]..... useradd: group 'admin' does not exist
-
brettnelson about 10 yearsI would be inclined to change the ownership on the entire drive, but do not know what that would do to the apps/services
-
nux about 10 yearsuseradd -G root username
-
Takkat about 10 yearsThere is no
admin
in 13.10 - you may by looking for groupsudo
. -
nux about 10 yearsits not recommended man
-
nux about 10 years@Takkat what command should be used
-
brettnelson about 10 yearsMembers of the admin group may gain root privileges..... %admin ALL=(ALL) ALL.....looks like an admin group
-
Takkat about 10 yearsits
usermod -aG
(preferred) oradduser
. -
nux about 10 years@ brettnelson if the answer help you mark it a good answer to help others
-
brettnelson about 10 yearsusermod: Permission denied. usermod: cannot lock /etc/passwd; try again later...... tried usermod -aG root username (error above)
-
brettnelson about 10 yearsThere seem to be several ways to do this, yet none work lol helarious
-
brettnelson about 10 yearsdammit, got ahead of myself, thanks, regardles tho I still do not understand why the sudo visudo edit did not work, thats the way it should have been handled , rather than ading myself to the root, correct?....or for that matter why the admin group IS listed in teh sudoers file, dont get it
-
brettnelson about 10 yearsno go, adding to root did not work
-
nux about 10 yearsdid you try to change the owner of the directory
-
brettnelson about 10 yearsbefore I go changing owners I would like to understand the sudo visudo issue.
-
brettnelson about 10 yearsusername:x:0:0:,,,:/home/username:/bin/bash.......changed in the passwd file, but wont let me save, permissions error again
-
brettnelson about 10 yearsAnyone care to tackle why this doesnt work.....?.......# User privilege specification root ALL=(ALL:ALL) ALL username ALL=(ALL:ALL) ALL
-
brettnelson about 10 yearssudo usermod -aG sudo username --------although no errors reported, doesnt seem to do anything either
-
rosscova over 7 yearsAn 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.