image
image

Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
Thread Tools
  #1  
Old June 23rd, 2004, 10:22 PM
Registered User
 
Join Date: Jun 2003
Posts: 104
Thanks: 0
Thanked 0 Times in 0 Posts
Travis86 is on a distinguished road
sudo won't work.

Alrighty, I was trying to install MySQL without the GUI installer. Since there was no /usr/local directory, I tried to create one. I didn't have the privilages to do that, so I tried "sudo mkdir local". It asked me for my password, and I hadn't enabled the root user, so I had to go do that first. Then I try "sudo mkdir local" with the root password, but it says my password is incorrect. No matter how many times I try or if I set the root password again, it still won't work.

Also, if I'm using sudo for the first time, why does it ask for a password? Is there some sort of default password that I don't know about?

I found someone else with the exact same problem elsewhere, but the people there said to reinstall. I don't think I need to reinstall when my computer is only seven days old.

Also, someone mentioned the problem here, but I don't reall know what they're talking about. $PATH looks ok to me.

Does anyone know what's wrong??
__________________
A Mac user since June 16, 2004.
G5 - Dual 1.8 - 1.25 Gb of ram
Reply With Quote
  #2  
Old June 23rd, 2004, 10:38 PM
profx's Avatar
ill never 4get watsisname
 
Join Date: May 2001
Location: Auckland New Zealand
Posts: 386
Thanks: 0
Thanked 0 Times in 0 Posts
profx is on a distinguished road
you do not have to have root user enabled to use sudo - i use it all the time.

You do however have to be a member of group admin i believe. if you check the sudoers file (which you cant because only the superuser can read it) i think it specifies which users or groups are allowed to use sudo.

Check the man file "man sudoers" but it is very long...
Interestingly i cant su to root - but i guess thats because i dont have root enabled.
__________________
| PowerBook G4 550 - 10.4 - 512Mb - 20Gb | 30Gb iPod Photo | 40x12x48 Fantom Drives CDRW (firewire) | Logitech Cordless Mouse MX700 | xBox with XBMC for movies and music in the lounge
Reply With Quote
  #3  
Old June 23rd, 2004, 11:05 PM
Registered User
 
Join Date: Jun 2003
Posts: 104
Thanks: 0
Thanked 0 Times in 0 Posts
Travis86 is on a distinguished road
Ok, here's my /etc/sudoers file.
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

# User privilege specification
root    ALL=(ALL) ALL
%admin  ALL=(ALL) ALL
According to "id", my user belongs to the admin group, so there shouldn't be any problem, right? If there isn't anything wrong with this file, what could be the matter?

Thanks.
__________________
A Mac user since June 16, 2004.
G5 - Dual 1.8 - 1.25 Gb of ram
Reply With Quote
  #4  
Old June 23rd, 2004, 11:31 PM
profx's Avatar
ill never 4get watsisname
 
Join Date: May 2001
Location: Auckland New Zealand
Posts: 386
Thanks: 0
Thanked 0 Times in 0 Posts
profx is on a distinguished road
how did you manage to read that file if you cant use sudo?

-r--r----- 1 root wheel 341 13 Sep 2003 /etc/sudoers

it should only be able to be read by root or wheel - and administrators in OS X are not in group wheel

If your permissions are not as above then i suggest you do a repair permissions on your drive - I know this is a standard fix issued by anyone/everyone on this forum but it might be justified in this case!

The sudo password is you normal OSX password - sudo authenticates you based on the sudoers file, provided you are in a group that is allow to sudo (which you are).

Strange. Do a repair permissions and tell us what happened!
__________________
| PowerBook G4 550 - 10.4 - 512Mb - 20Gb | 30Gb iPod Photo | 40x12x48 Fantom Drives CDRW (firewire) | Logitech Cordless Mouse MX700 | xBox with XBMC for movies and music in the lounge
Reply With Quote
  #5  
Old June 23rd, 2004, 11:33 PM
profx's Avatar
ill never 4get watsisname
 
Join Date: May 2001
Location: Auckland New Zealand
Posts: 386
Thanks: 0
Thanked 0 Times in 0 Posts
profx is on a distinguished road
Quote:
root ALL=(ALL) ALL
%admin ALL=(ALL) ALL
this is the same as mine - it means that user root and members of group admin may use sudo
__________________
| PowerBook G4 550 - 10.4 - 512Mb - 20Gb | 30Gb iPod Photo | 40x12x48 Fantom Drives CDRW (firewire) | Logitech Cordless Mouse MX700 | xBox with XBMC for movies and music in the lounge
Reply With Quote
  #6  
Old June 23rd, 2004, 11:45 PM
Registered User
 
Join Date: Jun 2003
Posts: 104
Thanks: 0
Thanked 0 Times in 0 Posts
Travis86 is on a distinguished road
I was able to read /etc/sudoers because I switched to root to do it. If I could do that as my normal admin user, something would really be messed up!

But all that aside, you have solved my problem. I thought sudo wanted my root password, when it really wanted my normal password. I don't know as that makes since, but at least it works. I was getting really worried there for a while. It's not a good feeling thinking something might be wrong with your brand-new computer. Phew!
__________________
A Mac user since June 16, 2004.
G5 - Dual 1.8 - 1.25 Gb of ram
Reply With Quote
  #7  
Old June 24th, 2004, 02:05 AM
Registered User
 
Join Date: Sep 2001
Location: Tokyo, Japan
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
legacyb4 is on a distinguished road
I run my account as a "normal" user in OS X but have enabled 'sudo' permissions for Terminal stuff; keeps my son's wandering fingers (or mine, for that matter) from doing any accidental damage to the GUI side of things but allows me the flexibility to work in Terminal as needed.

Simply add yourself to the sudoers file while your account is enabled as admin, then demote yourself back to a normal user once that's done.
Quote:
# User privilege specification
root ALL=(ALL) ALL
legacyb4 ALL=(ALL) ALL
%admin ALL=(ALL) ALL
Of course, I have a proper admin account set aside for any other use if the need arises...
__________________
Macbook (Black) C2D/120GB/2GB | G5/1.6 250GBx2/1.25GB
Free Mobile Phone Ringtone, Application, & Screensaver Uploader
Reply With Quote
  #8  
Old June 24th, 2004, 05:37 AM
pds's Avatar
pds pds is offline
conf User
 
Join Date: Oct 2002
Location: On the edge.
Posts: 2,159
Thanks: 0
Thanked 0 Times in 0 Posts
pds is on a distinguished road
when using sudo, just use the admin login and password

I run it from other profiles or from my own, just type in the login and password of the admin account.

or get the easy install version - www.serverlogistics.com
Reply With Quote
Reply

Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


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


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.