LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 07-18-2006, 02:28 AM   #1
thammerlund
LQ Newbie
 
Registered: Jul 2006
Posts: 22

Rep: Reputation: 15
UID Problem


I keep getting the error:

Code:
sudo: /etc/sudoers is owned by uid 500, should be 0
Can anyone help me change this? I think the reason for this problem is because I copied "sudoers" from another machine. I've seen other posts about changing the uid, but that they seem to be dealing with a person's uid, not a file.

Anyway, thank you in advance.
Tom
 
Old 07-18-2006, 02:45 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
SU to root and run "chown root /etc/sudoers"

Then edit it using the "visudo" program. Does it look like the normal highly commented sudoers file?
I'm just concerned whether it was written over with a blank file somehow.

Last edited by jschiwal; 07-18-2006 at 02:47 AM.
 
Old 07-18-2006, 03:21 AM   #3
thammerlund
LQ Newbie
 
Registered: Jul 2006
Posts: 22

Original Poster
Rep: Reputation: 15
Thank you for replying.

I'm not sure what a normal sudoers file looks like, so here is mine.

Code:
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

Defaults    env_reset
Defaults    env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \
                        LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \
                        LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \
                        LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \
                        LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \
                        _XKB_CHARSET"

# Runas alias specification

# User privilege specification
root	ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
%wheel	ALL=(ALL)	ALL

# Same thing without a password
# %wheel	ALL=(ALL)	NOPASSWD: ALL

# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now
 
Old 07-18-2006, 08:49 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
It looks a bit stripped down compared to mine, but otherwise it looks OK. If you want to use sudo, I would suggest that you uncomment this line:
%wheel ALL=(ALL) ALL

Then make yourself a member of the "wheel" group.
You should need to prefix commands in /sbin and /usr/sbin, for example:
sudo /sbin/route
 
Old 07-19-2006, 01:43 AM   #5
thammerlund
LQ Newbie
 
Registered: Jul 2006
Posts: 22

Original Poster
Rep: Reputation: 15
Thank you for your help.
 
  


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
automounter uid question/problem jwholey Linux - Networking 0 06-01-2006 10:33 AM
Changing the UID of a Physical Volume to a specific UID jambraun Linux - Newbie 2 02-09-2006 03:34 PM
FREEBSD5.3 platform: PHP setcookie() successful, but $uid = $_COOKIE['uid']; fail tclwp Programming 1 03-30-2005 09:05 PM
Mounting NFS Shares ... UID Problem Riddick Linux - Software 1 01-06-2005 10:48 AM
Uid problem, can't log in computergirl Linux - General 5 05-23-2003 07:09 PM


All times are GMT -5. The time now is 12:46 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration