image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old November 2nd, 2005, 07:48 PM
Registered User
 
Join Date: Nov 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
starboardman is on a distinguished road
I deleted the root user! Help!

I'm using OSX 10.4.3. I was trying to enable root, but somehow it got deleted. I just added root again, but it's not working because I don't remember any of the properties or values that are supposed to be there. Is there is a default set of properties and values for root on pretty much any system, if so what are they? If not, what do I need to do??
Reply With Quote
  #2  
Old November 2nd, 2005, 09:37 PM
BjarneDM's Avatar
Registered User
 
Join Date: Oct 2005
Location: København ; Danmark ; Europa
Posts: 148
Thanks: 0
Thanked 0 Times in 0 Posts
BjarneDM is on a distinguished road
Just how did you try to enable root ?
Please specify the steps you've taken much more detailed.
__________________
Bjarne D Mathiesen
København ; Danmark ; Europa
Reply With Quote
  #3  
Old November 2nd, 2005, 11:57 PM
Registered User
 
Join Date: Nov 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
starboardman is on a distinguished road
I used Netinfo Manager, I copied the password from another user to root, and saved it... then , I don't know, I was multitasking and I came back to Netinfo to find that the root user entry was gone!
Reply With Quote
  #4  
Old November 3rd, 2005, 03:31 AM
BjarneDM's Avatar
Registered User
 
Join Date: Oct 2005
Location: København ; Danmark ; Europa
Posts: 148
Thanks: 0
Thanked 0 Times in 0 Posts
BjarneDM is on a distinguished road
So let me get this straight: because of some foolhardy manipulations in 'Netinfo Manager' you have inadvertently deleted the root user account entry.

1) you can't copy passwords around in 'Netinfo Manager'. If you want to change passwords for normal users use the 'Accounts' prefPane or the 'passwd' command in 'Terminal'

2) in 'Netinfo Mananger' you can en-/dis-able the root account and set/change the password for the root account. This is *all* done from the 'Security' menu

3) the root account entry is almost the same as for a normal user account - it's just lacking some un-neccessary entries. The root account has the following entries (when disabled):
Code:
[10:17:07@Utilities]$ nidump -r /users/root .
{
 "uid" = ( "0" );
  "expire" = ( "0" );
  "home" = ( "/var/root" );
  "shell" = ( "/bin/sh" );
  "gid" = ( "0" );
 "name" = ( "root" );
  "realname" = ( "System Administrator" );
  "change" = ( "0" );
  "_writers_passwd" = ( "root" );
}
4) to re-create the root user entry you can thus simply copy eg your admin acount and change/delete the entries in the copy to correspond to the above.
__________________
Bjarne D Mathiesen
København ; Danmark ; Europa
Reply With Quote
  #5  
Old November 3rd, 2005, 04:30 AM
Registered User
 
Join Date: Nov 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
starboardman is on a distinguished road
Thanks. Now, whenever I use the command "su root", it works but the user becomes "nobody", it creates "nobody" even if I delete it. How can I actually switch to root?
Reply With Quote
  #6  
Old November 3rd, 2005, 05:33 AM
fryke's Avatar
Super Moderator
 
Join Date: Sep 2000
Location: macosx.com
Posts: 13,162
Thanks: 2
Thanked 12 Times in 12 Posts
fryke has a spectacular aura aboutfryke has a spectacular aura about
Why even _activate_ the root user in the first place? *sigh* ... You shouldn't login graphically as root, anyway, so...
Code:
Last login: Wed Nov  2 22:08:21 on console
Welcome to Darwin!
frykes-Computer:~ fryke$ sudo -s
Password:
frykes-Computer:~ root# whoami
root
frykes-Computer:~ root#
__________________
MacBook Air 13" 1.6 GHz, 2 GB RAM, 80 GB HD. Mac OS X 10.5.5
MacBook 13" 1.83 GHz, 2 GB RAM, 160 GB HD. Mac OS X 10.5.5
Hackintosh Core2Duo 2.4 GHz, 2 GB RAM, 160 GB HD. Mac OS X 10.5.5
iPhone 3G 16 GB (v2.1), AppleTV 1G 40 GB (v2.1)

Mac user since 1987, Apple Product Professional 2007, 2008.
Reply With Quote
  #7  
Old November 3rd, 2005, 06:01 AM
BjarneDM's Avatar
Registered User
 
Join Date: Oct 2005
Location: København ; Danmark ; Europa
Posts: 148
Thanks: 0
Thanked 0 Times in 0 Posts
BjarneDM is on a distinguished road
I'm assuming the following:
i) when you use 'su root' you get a prompt somewhat like this:
[computername]:~ nobody#
ii) you've used 'Netinfo Manager' to delete the 'nobody' user.

0) !Please! provide much more detailed problem descriptions. I'm having to make educated guesses as to what you are actually meaning, guesses that might lead me to provide bad, incomplete or falty advise:
a) describe in as much detail as possible the steps you have taken that has led you into trouble
b) if you are seing something abnormal or unexpected, please provide an example of the abnormal behaviour as well as an example of what you expected to see.

1) !!!DON'T!!! delete the special users created by and used by the system. That's the straight way to eventually getting serious problems with your OS - finally leading you to having to reinstall everything from scratch. Look, 'Netinfo Manager' is a program you !!!ONLY!!! mess around with if you are at least 200% sure of what you are doing - or are willing to the the consequenses. To be blunt and frank, you seem to understand neither the special user accounts nor the 'Netinfo Manager'. Normal Mac OS X system administration *doesn't* require *any* interaction with 'Netinfo Manager' at all !!! It's for serious and very, very advanced administration of the system. Normally, you only ever use it to enable the root account - and even that seldomly.

2) nobody has to look like this:
[10:22:33@Utilities]$ nidump -r /users/nobody .
Code:
{
  "name" = ( "nobody" );
  "passwd" = ( "*" );
  "uid" = ( "-2" );
  "gid" = ( "-2" );
  "change" = ( "0" );
  "expire" = ( "0" );
  "realname" = ( "Unprivileged User" );
  "home" = ( "/var/empty" );
  "shell" = ( "/usr/bin/false" );
  "_writers_passwd" = ( "nobody" );
}
!Please! make sure that it does so.

3) under normal circumstances you don't need to switch to the root user. 'sudo' is more than enough and isolates you from most serious mistakes. !Don't! use the root account for normal administration - it's for very serious emergencies only.

4) actually switching fully to root is accomplished with this command:
sudo su - root

5) if the reason for you to want to switch to root is that you are tired of being prompted for the admin password a much better solution is to do as described here: http://fink.sourceforge.net/faq/usag...hpLang=en#sudo
__________________
Bjarne D Mathiesen
København ; Danmark ; Europa
Reply With Quote
  #8  
Old November 3rd, 2005, 09:12 AM
nixgeek's Avatar
Mac of the SubGenius! :-)
 
Join Date: Jan 2004
Location: Miami, FL
Posts: 7,551
Thanks: 15
Thanked 89 Times in 73 Posts
nixgeek has a spectacular aura aboutnixgeek has a spectacular aura aboutnixgeek has a spectacular aura about
ACtually, sudo should already be installed with Mac OS X by default. And using the sudo command will alow you to do anything root can do without actually becoming root. The only reason you might need to activate root is if an application (like nmap) needs exclusive root access. There are ports now of nmap for OS X that don't even require you to manually enable to root user...it takes care of that for you.
__________________
Apple iMac G5 17" (2 GHz G5) - Mac OS X 10.4.11
Apple Macintosh Quadra 650 (33 MHz MC68040) - Mac OS 8.1
Apple PowerBook Duo 230 (33 MHz MC68030) - System 7.1
"JHVH-1" (2 GHz AMD Athlon XP 2400+) - Slackware 12.1
"Kidbuntu" (2.8 GHz Celeron D 335) - Ubuntu 8.04
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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 03:13 AM.


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.