The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > OS X (Apple)
Google UNIX.COM


OS X (Apple) OS X is a line of Unix-based graphical operating systems developed, marketed, and sold by Apple.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
switching user from root to ordinary user sasia Shell Programming and Scripting 3 01-25-2008 06:25 PM
Su to user from root nitin Shell Programming and Scripting 3 10-25-2006 12:21 AM
Other than root user .Normal user is unable to create files mallesh UNIX for Advanced & Expert Users 1 06-22-2005 09:18 AM
root user hassan2 UNIX for Advanced & Expert Users 1 05-29-2002 11:15 AM
Using telnet client from MacOSX's command line terminal tylerl UNIX for Dummies Questions & Answers 2 07-15-2001 07:05 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-26-2005
Registered User
 

Join Date: Jan 2005
Posts: 21
Root user in MacOSX

Hello, Do you guys know how does the root user works in this system?

from the terminal i try to su to root, and i thought the password was the same as the macosx password, at the /etc/passwd file the passwd field appears as *, so it's system bussines only, is there a way to become root? i thought since i was the only user registered in the system i was kind of like root... guess not

thanks.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-26-2005
Registered User
 

Join Date: Dec 2005
Posts: 18
Prefixing each command with sudo works well. Also, you only need to enter a password once per session.
Reply With Quote
  #3 (permalink)  
Old 01-07-2006
dsbeerf's Avatar
Registered User
 

Join Date: Dec 2005
Location: Chicago, IL USA
Posts: 58
Re: Root User in MacOS X.

Gee, it's been a while since I did this.

Use the NetInfo Manager (in /Applications/Utilities). "Unlock" the access, and the system will ask you for YOUR password. You can then go th the columnar display, click on users, and the list of users will appear in the 'next-right' column. Click on root, and all the info on 'root' will appear in the bottom window. Double click on the field to the RIGHT of the 'password' label, which is the encrypted password for 'root'. CLEAR that field, and 'submit it' by hitting 'Return'. Then hit <Command>-S, to SAVE this new data. You can then open a terminal window, and "su -". A password will be asked for, and the 'Return' will be it. Change the root password to something secure by entering: "passwd root". This will NOW be the 'root password', and you will be able to login at the "login window" AS root, and "su"-ing in a terminal session will work as expected.
Reply With Quote
  #4 (permalink)  
Old 01-13-2006
Registered User
 

Join Date: Dec 2005
Posts: 18
I tried that, sudo still returns an incorrect password error.

running 10.4.4
Reply With Quote
  #5 (permalink)  
Old 01-13-2006
dsbeerf's Avatar
Registered User
 

Join Date: Dec 2005
Location: Chicago, IL USA
Posts: 58
Quote:
Originally Posted by cymon
I tried that, sudo still returns an incorrect password error.

running 10.4.4
This is because sudo != su. SUDO has it's own 'privileges file'. On MacOS X, this file is: /private/etc/sudoers

You MUST edit this file with 'visudo' AS root, to establish how you want sudo to behave.

So, first go HERE in your browser:
http://www.almaren.org/tmp/sudoers.sample

Then, with the file in your browser as a guide enter (in a terminal window):
'su -' <return>
visudo <return>

You will then have an *example* reference 'sudoers' file in your browser, and be editing the 'sudoers' file in a terminal window.
The sample 'sudoers' file, in your browser, will help you set up your 'sudoers' file that you are editing.

Last edited by dsbeerf; 01-13-2006 at 01:51 PM.
Reply With Quote
  #6 (permalink)  
Old 01-19-2006
Registered User
 

Join Date: Sep 2002
Location: San Fran
Posts: 108
It should be much simpler than that. If you are designated as an admin for that system, type: sudo [whatever command you wanted to use]
You'll be presented with a prompt for a password. Type "your" password, not root's, not the the File Vault password, but "your" password.

If your account is "allowed to administer this computer" then you are automagically added to the sudoers file.
Which version of OS X are you using?
Reply With Quote
  #7 (permalink)  
Old 01-19-2006
dsbeerf's Avatar
Registered User
 

Join Date: Dec 2005
Location: Chicago, IL USA
Posts: 58
Quote:
Originally Posted by [MA]Flying_Meat
It should be much simpler than that. If you are designated as an admin for that system, type: sudo [whatever command you wanted to use]
You'll be presented with a prompt for a password. Type "your" password, not root's, not the the File Vault password, but "your" password.

If your account is "allowed to administer this computer" then you are automagically added to the sudoers file.
Which version of OS X are you using?
Yup. You are correct. I started off telling how to get 'su' to work, I 'kept going' describing 'sudo', and I should have quit while I was ahead. You only need to futz around with visudo (and all that other 'stuff') if another user (not the Owner/Administrator) needs sudo.

Sorry, my mistake. (Hey -- THANKS !!)
---
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:59 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0