|
#1
| |||
| |||
| root? I can't get root on a MacBook Pro that I bought recently. I created a new user on the computer when I started it the first time. I thought that I had created the new user with full privileges, or near. On an xterm, I can't execute some commands because I don't have the privileges. Not even 'sudo'. I looked at the /etc/passwd file, but there is no root user there. What's the trick? |
|
#2
| ||||
| ||||
| Root is disabled in MAc OS X as a security measure. When you created the first user, did you make sure that you gave it the ability to administer the computer? If you need to become root without becoming root, do a "sudo -s" and then supply your user password. You'll get dropped to a "#" prompt. Ubuntu Linux also follows this measure similarly.
__________________ • 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 |
|
#3
| |||
| |||
| Fortunately I did give the user admin permissions when I created it. 'sudo -s' worked, thank you. |
|
#4
| ||||
| ||||
| Awesome. Glad I could help. ![]()
__________________ • 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 |
|
#5
| |||
| |||
| You know, after all of these years using OS X and linux I never knew of the -s option... that makes my life so much easier hahaha... |
|
#6
| ||||
| ||||
![]() ANother one I found out for Linux was the "su -" command (note the sole dash after the "su"). This logs you as root as if you had logged on from the login prompt. Very useful especially when installing CMS software or MySQL database information. ![]()
__________________ • 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 |
|
#7
| ||||
| ||||
| And that's not the same as "sudo -s"? I thought they had the very same result. Or are things you do logged under your username when you're obviously "root" by going to the root shell with "sudo -s"?
__________________ 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. |
|
#8
| ||||
| ||||
| sudo -s keeps your original user environment. You can see this, for instance, if you have very different path settings for root and your user. If this is the case, then sudo -s echo $PATH will show a different value than sudo -s su - echo $PATH Similarly, if you need to switch to a different user and inherit that user's environment, you say su - [username]
__________________ Matt (billbaloney) 1.67GHz "October 2005" G4 Aluminum 1.5 GB RAM, OS 10.5.2 Lots of other things around Helen Marie Holford Industries |
![]() |
| Thread Tools | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do I log in as ROOT? | bighairydog | Mac OS X System & Mac Software | 2 | November 4th, 2001 09:54 AM |
| Can't log in as root! | kvarnbrink | Mac OS X System & Mac Software | 0 | June 5th, 2001 06:43 PM |
| on root and gcc | Char Aznable | Mac OS X System & Mac Software | 0 | May 31st, 2001 11:20 AM |
| #root | skaneby | Mac OS X System & Mac Software | 3 | May 17th, 2001 03:41 AM |
| Root can't receive email; /var/mail/root | Adam | Mac OS X System & Mac Software | 1 | April 9th, 2001 12:23 PM |