LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-06-2013, 01:46 PM   #1
NTH
LQ Newbie
 
Registered: Jul 2013
Posts: 23

Rep: Reputation: Disabled
username in sudoer group but need to sudo all the time


Hi,
I recently installed Ubuntu 12.0.4 LTS. I am already admin and in the sudoers group:

Code:
root@machine:# groups username
username : username adm cdrom sudo dip plugdev lpadmin sambashare
but the problem is that my username does not have permission to copy/generate files and run programs in my home directory and I need to become root all the time or change the permissions of the file or directory to be able to access or modify it. How can I give my username this permissions?
Thanks

Last edited by NTH; 09-06-2013 at 01:47 PM.
 
Old 09-06-2013, 02:03 PM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Looks like all your permissions are fubared try
Code:
sudo chown -R YOURUSERNAME:YOURUSERNAME /home/YOURUSERNAME
Replace YOURUSERNAME with your own username of course or if worse comes to worse login as root delete your user ( back up any important files first ! ) then re-add your user.
 
1 members found this post helpful.
Old 09-06-2013, 02:34 PM   #3
NTH
LQ Newbie
 
Registered: Jul 2013
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Keith Hedger View Post
Looks like all your permissions are fubared try
Code:
sudo chown -R YOURUSERNAME:YOURUSERNAME /home/YOURUSERNAME
Replace YOURUSERNAME with your own username of course or if worse comes to worse login as root delete your user ( back up any important files first ! ) then re-add your user.
This solved it. The only change I had to make was that I did not use sudo in the above command. root did not have permission to change ownership. Thanks for the help!.
 
Old 09-06-2013, 02:42 PM   #4
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Odd that sudo couldn't do it

what do you get from ( as your normal user )

Code:
sudo -l
that lists your users sudo setup,
the default on ubuntu should have "(ALL : ALL) ALL" in it
 
Old 09-06-2013, 02:51 PM   #5
NTH
LQ Newbie
 
Registered: Jul 2013
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Firerat View Post
Odd that sudo couldn't do it

what do you get from ( as your normal user )

Code:
sudo -l
that lists your users sudo setup,
the default on ubuntu should have "(ALL : ALL) ALL" in it
Here is the output:

Code:
Matching Defaults entries for username on this host:
    env_reset,
    secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin

User username may run the following commands on this host:
    (ALL : ALL) ALL
This is after I did chown. I guess it looked the same before but I'm not sure.
 
Old 09-06-2013, 03:11 PM   #6
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
yeah, it would have been the same.

I might try and break a VM tomorrow, see if I can get the same broken sudo.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Modify group(%admin) with username in sudoers file smilemukul Linux - Newbie 5 06-08-2012 02:39 AM
sudo adduser [username] Howey Linux - Newbie 7 08-27-2011 08:29 AM
command used: sudo su - username sandeep002gupta General 2 07-05-2011 11:08 AM
sudo -i -u username Xephyr, fails multi Linux - Desktop 1 02-05-2010 04:43 PM
Sudo Group CrimsonSparc Linux - Newbie 17 06-14-2005 02:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration