System Administrator Password

S

savers

Guest
Friend of my wife's just got a devorce and the jerk took his password protected admin password with him and left her with the computer and he also took the install cd. I'm a windows user mainly and not that familar with this system but can get to superuser (root) status or at least when I type in whoami it tells me I am root but i am unfamilar with the system -

can I make a new user with admin rights from this terminal?

please respond -- email me at [email protected]

she has a emac
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
If you are truly the root user. Then you still have control, some control. if you want to change the root pass word you will need the previous pass word. The only was to change it is get a set of install disks.

You can try to create another user id.
 
OP
S

savers

Guest
rman said:
If you are truly the root user. Then you still have control, some control. if you want to change the root pass word you will need the previous pass word. The only was to change it is get a set of install disks.

You can try to create another user id.


--------------------------------------------------------------------------

i type in whoami

it replys root

I need the instructions from superuser mode (holding down keys on the keyboard will boot you into this mode) I need to know how to create another admin or to delete the current admin's password. fild locations or instructions type situation for an emac
 
OP
S

savers

Guest
would any of this work?/
--------------------------------------------------------------------------------

if it's running os x and there isn't a firmware password, you can change the password or get the hash in a couple of minutes. well not if the computer is running 10.3, the single user mode locks up if you try to get the hash or change the password. provided the computer is running any os x lower that 10.3 you just do the following:

1) boot up holding the apple + s keys
2) type /sbin/mount -uw / (you don't need to run the /sbin/fsck -y /)
3) type /sbin/systemstarter
4) either type passwd (account goes here) to change the password
or type nidump passwd . to get the hash to brute force if you want to
be a little more subtle with the whole hacking thing.

-------------------------------------------------------------------

you type nidump -r /users/<whatever adminname>/passwd /

to dump the password hash

PLUS, WHY BOTHER TO TAKE 8 HOURS OF YOUR TIME WHEN YOU CAN REMAKE YOUR PASSWORDS VIA NIUTIL.

this just drives me up th wall

use openssl passwd <new password>

niutil -destroyprop /users/<whater admin name> passwd

niutil -createprop /users/<whatever admin name> passwd <hash above>

seriously, you guys need to explore NetInfo commands more.

---------------------------------------------------------------------


The Mac uses the NetInfo database as a password file instead of /etc/passwd. You add new users to the NetInfo database using the nidump and niload commands. For example, as root:

# cd /tmp
# nidump passwd . > passwd.new

This will dump the contents of the NetInfo passwd table into passwd.new. Edit passwd.new to add users, e.g. to add user smith you would add a line something like:

smith::12434:200:0:0::Joe Smith:/afs/www.google.com:/bin/tcsh

Load the file back into the Netinfo database with the command:

# niload passwd . < passwd.new


To modify a password entry, edit the file passwd.new to make the necessary changes, and load it into the NetInfo database with the command:

# niload -d passwd . < passwd.new

----------------------------------------------------------------
 
OP
S

savers

Guest
or would this work?

----------------

Exploit

Step 1) Restart the computer (or turn it on if it's already off) while holding down the command and s keys at the same time. (If the computer is running Mac OS Public Beta, just press the s key.) They have root privileges at this moment, but now it's time to take advantage of these privileges.

Step 1.5) Type "/sbin/fsck -y". (Type this without the quotes, of course.) (This step really isn't necessary at all, but it just takes a second, and they might as well just do a quick check of the hard disk before mounting it.)

Step 2) Type "/sbin/mount -wu /" (This mounts the volume "/" with read/write access.)

Step 3) Type "/sbin/SystemStarter" (This starts the network services, which is necessary to gain access to NetInfo.)

Step 4) Here, one could now just type "passwd root" and override the existing root password with one of their own, or worse yet, someone could just get the current root password (and/or the administrative user account password) so the administrators of that computer don't know that their security has been compromised. One of the easiest ways to do this is to just type "nidump passwd ." and write down the root account's password hash. (The hash will be the text that looks like just a garbled mess of alphanumeric characters between two colons.)


Step 5) Now one can type up what they wrote down into a plain text file like the following example: "root:rQkFQ37SYveHw:0:0::0:0:System Administrator:/var/root:/bin/tcsh".

Step 6) Finally, they'll use a cracking program like John the Ripper for the PC, or the Meltino, a Classic Macintosh application, to crack the password hash.

And when it's finally cracked it, they've got the password


3) Capitalization Matters! "/sbin/SystemStarter"

Posted: February 27, 2004, 5:21 pm Post subject:
 
Joined
Nov 4, 2003
Messages
654
Reaction score
11
Points
18
Location
Southern Indiana
Your Mac's Specs
Mac Pro Quad Xeon 2.66GHz 3GB RAM, G4 Quicksilver w/Sonnet 1GHz Encore ST, 1ghz G4 Powerbook
I'm leaning toward there being a reason you can't get to the admin password. Like rman said, you need an install cd.

Look on the good side…she got the computer, all he got was the install cd and the admin password.
 
OP
S

savers

Guest
yo i have the root which I am thinking is suppose to over everything - why should I need a install cd.. I thought this unix crap was all about open source... no different then windows so if you can't beat them join them..
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
Open source has nothing to do with security.
 
Joined
Mar 9, 2004
Messages
9,065
Reaction score
331
Points
83
Location
Munich
Your Mac's Specs
Aluminium Macbook 2.4 Ghz 4GB RAM, SSD 24" Samsung Display, iPhone 4, iPad 2
Open source has EVERYTHING to do with security, but not in the sense savers means.

Theoretically if you are root then you should be able to create a new admin right?
 
Joined
Jun 25, 2004
Messages
1,779
Reaction score
65
Points
48
Location
Luxemburg, Europe
Your Mac's Specs
PowerMac G5 Dual 2GHz (June 2004), 2.5GB, Airport, black 5G iPod 30GB, white MacBook 2.0 2GB
Aptmunich said:
Open source has EVERYTHING to do with security, but not in the sense savers means.

Theoretically if you are root then you should be able to create a new admin right?

Not just theoretically...
As root in OS X, you can do everything, just like in Linux/UNIX. This includes creating a new user with admin rights, celeting an existing user, even without having his/her password AND messing up the system, which I managed to do while playing around too much... :D

So be careful with what you do, but as long as you're just creating/erasing users, the system won't take any harm...
I played around with system files, resulting in Kernel Panics and happy reinstallation parties :D
 
Joined
Jun 24, 2008
Messages
1
Reaction score
0
Points
1
would any of this work?/
--------------------------------------------------------------------------------

if it's running os x and there isn't a firmware password, you can change the password or get the hash in a couple of minutes. well not if the computer is running 10.3, the single user mode locks up if you try to get the hash or change the password. provided the computer is running any os x lower that 10.3 you just do the following:

1) boot up holding the apple + s keys
2) type /sbin/mount -uw / (you don't need to run the /sbin/fsck -y /)
3) type /sbin/systemstarter
4) either type passwd (account goes here) to change the password
or type nidump passwd . to get the hash to brute force if you want to
be a little more subtle with the whole hacking thing.

-------------------------------------------------------------------

you type nidump -r /users/<whatever adminname>/passwd /

to dump the password hash

PLUS, WHY BOTHER TO TAKE 8 HOURS OF YOUR TIME WHEN YOU CAN REMAKE YOUR PASSWORDS VIA NIUTIL.

this just drives me up th wall

use openssl passwd <new password>

niutil -destroyprop /users/<whater admin name> passwd

niutil -createprop /users/<whatever admin name> passwd <hash above>

seriously, you guys need to explore NetInfo commands more.

---------------------------------------------------------------------


The Mac uses the NetInfo database as a password file instead of /etc/passwd. You add new users to the NetInfo database using the nidump and niload commands. For example, as root:

# cd /tmp
# nidump passwd . > passwd.new

This will dump the contents of the NetInfo passwd table into passwd.new. Edit passwd.new to add users, e.g. to add user smith you would add a line something like:

smith::12434:200:0:0::Joe Smith:/afs/www.google.com:/bin/tcsh

Load the file back into the Netinfo database with the command:

# niload passwd . < passwd.new


To modify a password entry, edit the file passwd.new to make the necessary changes, and load it into the NetInfo database with the command:

# niload -d passwd . < passwd.new

----------------------------------------------------------------

Hold cmd s is not working for me.. I have an iMac a1224
 
Joined
Apr 13, 2010
Messages
6
Reaction score
0
Points
1
Too much thought applied here to a simple issue. No need to use any hash utility to change the old user pw. Just create a new admin user. Any admin can change the pw of any other admin even without knowing the old pw.

Boot to single-user mode (hold ⌘ and the S key for 30 seconds at startup).
Type:
/sbin/mount -uw /
Press Return.
Type:
rm /var/db/.applesetupdone
Press Return.
Type:
reboot
Press Return.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
You just replied to a post that's three years old and a thread that's even older. Please observe the date of the post before deciding to reply. Thanks.
 
Joined
Nov 28, 2007
Messages
25,564
Reaction score
486
Points
83
Location
Blue Mountains NSW Australia
Your Mac's Specs
Silver M1 iMac 512/16/8/8 macOS 11.6
LOL the original post is SEVEN years old!

Tough luck if still unable to access user name by now!
 
Joined
Jun 8, 2011
Messages
1
Reaction score
0
Points
1
Don't criticize helpful posts

You just replied to a post that's three years old and a thread that's even older. Please observe the date of the post before deciding to reply. Thanks.

Don't be so quick to criticize helpful/useful posts. Instead you should thank him for adding a very simple, quick fix to the problem. 7 years late, or not, it was the most helpful post in this thread. BETTER LATE THAN NEVER!

Thank you VERY much mf666!
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top