LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-05-2007, 01:10 PM   #1
06jer
LQ Newbie
 
Registered: Sep 2006
Location: Oswego
Distribution: Crux
Posts: 10

Rep: Reputation: 0
Giving a user sudo


Hey,

I am running Crux 2.3 with Xfce 4. I'm still new so please pardon any ignorance on my part.

I have my system all set up (for the most part) so I created a user account for daily use. I then added my account to the sudoers file with the same access as root so I can use sudo. The problem is that when I login to my account my system to believes me to be root. Mousepad and Thunar warn me that "using root may harm your system" while Pidgin and Claws-mail show root instead of what my user name is.

I'm not sure if there's any info I could post. Google did a great job of explaining how to add users and groups so I believe that stuff to be correct. The only change I made to the sudoers file (using visudo of course) was to add a line below root like this:

myAccountName ALL=(ALL) ALL

Thanks,

Jer
 
Old 09-05-2007, 01:30 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Quote:
myAccountName ALL=(ALL) ALL
That's probably what did it. You should have scrolled down a bit and added something like:

# bob can run these commands without a password
bob ALL = NOPASSWD: /usr/bin/updatedb, /usr/bin/mysqld_safe
, /bin/mount, /bin/umount
 
Old 09-05-2007, 01:35 PM   #3
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
Quote:
Originally Posted by bigrigdriver View Post
That's probably what did it. You should have scrolled down a bit and added something like
No? Here's my /etc/sudoers, and when I log in as alucard I'm not root.
Code:
root    ALL=(ALL) ALL
alucard ALL=(ALL) ALL
 
Old 09-05-2007, 05:32 PM   #4
06jer
LQ Newbie
 
Registered: Sep 2006
Location: Oswego
Distribution: Crux
Posts: 10

Original Poster
Rep: Reputation: 0
I have found out more information.

The name of my account is jeremy.

When I'm in Xfce and when I run whoami it says root, but when I logout of Xfce and run whoami it says jeremy. In order for me to start Xfce I need to run sudo startxfce4.

I thought it was the su command that changed me into root whereas the sudo command just lets me run as root for a single command. No?

Last edited by 06jer; 09-05-2007 at 05:33 PM.
 
Old 09-05-2007, 06:43 PM   #5
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
Yes. Your command runs startxfce4 as root.. and any programs startxfce4 calls. So you would be root all around.
 
Old 09-05-2007, 08:49 PM   #6
06jer
LQ Newbie
 
Registered: Sep 2006
Location: Oswego
Distribution: Crux
Posts: 10

Original Poster
Rep: Reputation: 0
Ah, I see.

I guess now I'm just trying to figure out how to start Xfce without sudo. What I tried to do add /usr/bin/startxfce4 to the allowed commands for the group "users" and assigned my account to that group in the "group" file. But that apparently doesn't work...

EDIT: I figured it out. It was a file permissions thing. Thanks for the help!

Last edited by 06jer; 09-05-2007 at 08:57 PM.
 
  


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
LXer: The Ultimate Sudo FAQ To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 02:36 AM
Giving user 'www-data' same permissions as normal user MikeOfAustin Linux - Software 5 06-08-2007 03:50 AM
sudo and user themes ahh Linux - Software 0 03-11-2007 03:15 PM
Sudo for more than one user MOCKBA Ubuntu 3 09-30-2006 03:38 AM
SUDO for user nobody tracer Linux - Newbie 3 01-12-2006 03:12 PM


All times are GMT -5. The time now is 12:16 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