LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 02: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 02:47 PM.
 
Old 09-06-2013, 03:03 PM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 2,307

Rep: Reputation: 566Reputation: 566Reputation: 566Reputation: 566Reputation: 566Reputation: 566
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, 03: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, 03:42 PM   #4
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
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, 03: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, 04:11 PM   #6
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:39 AM
sudo adduser [username] Howey Linux - Newbie 7 08-27-2011 09:29 AM
command used: sudo su - username sandeep002gupta General 2 07-05-2011 12:08 PM
sudo -i -u username Xephyr, fails multi Linux - Desktop 1 02-05-2010 05:43 PM
Sudo Group CrimsonSparc Linux - Newbie 17 06-14-2005 03:54 AM


All times are GMT -5. The time now is 07:58 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration