New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

how to reset user's password using command line?


Post Reply New Thread Subscribe

 
Thread Tools
rixter07

 
Member Since: Dec 26, 2009
Posts: 3
rixter07 is on a distinguished road

rixter07 is offline
I have Mac OS 10.5, specifically Darwin Kernel Version 9.8.0.

I need to reset a user password at the command line. In other Unix flavors, there is a command usermod for this; I am trying to find the Darwin equivalent of this...if it exists.

I cannot use the System Preferences/Accounts for this because, bizarrely, this user does not appear in that list. The user is the mysql user that got created for the sake of managing MySQL. Somehow, I have managed to get that user created, but no longer have access to the password.

I've searched many other places and forums for this info to no avail; hope I can find good intel here!

TIA,
Rick
QUOTE Thanks
directeuphorium

 
Member Since: Dec 24, 2009
Posts: 54
directeuphorium can only hope to improve

directeuphorium is offline
passwd will Modify a user password.

for a handy list of commands
http://ss64.com/osx/
QUOTE Thanks
rixter07

 
Member Since: Dec 26, 2009
Posts: 3
rixter07 is on a distinguished road

rixter07 is offline
Thanks, but that's not the equivalent command; passwd only works if you are logged in that user. I need to be logged in as root and modify the password for another user on the system.

Anybody else know what I mean? There's a difference between usermod and passwd.
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,638
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
No, you're incorrect you can use passwd to modify any users password. You just can't do it as a non-privileged user.


sudo passwd <username>

that will allow you to reset a users password. man passwd should have covered that

btw, since root isn't really an enabled account out of the box.. sudo works. Well, sudo works on any Unix.. there is no need to log on as root, just be allowed to sudo.

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks
rixter07

 
Member Since: Dec 26, 2009
Posts: 3
rixter07 is on a distinguished road

rixter07 is offline
Dysfunction

I appreciate that correction of my understanding of the passwd command. The ability to correct another user's password in that way is not covered in the man page on my version Darwin; here's the Synopsis:

SYNOPSIS
openssl passwd [-crypt] [-1] [-apr1] [-salt string] [-in file] [-stdin] [-noverify] [-quiet]
[-table] {password}

Nonetheless, I tried it on my problematic mysql user account. It took the new password without complaint -- but did not work. When I logged out, and tried to login to my system with username mysql and the new password, the system would not let me in. (Interestingly, it "thought" about the password for a few seconds, then the login window vibrated (wigggled?), the password field in the window went blank, apprarently saying "Password incorrect; try again".

It appears whatever I have done with my mysql installation is more subtle than this simple password correction can correct....

If anyone has any ideas, any comments much appreciated....

--Rick
QUOTE Thanks

Post Reply New Thread Subscribe


« Sleep logs out of everything I want to stay logged on to | Should I upgrade? »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Password got removed, need to reset it rsherid OS X - Operating System 3 10-14-2009 08:00 PM
Admin Account Password diver4life OS X - Operating System 2 09-16-2009 09:10 PM
Dlink router password setup. Forgot password needhelpplease Internet, Networking, and Wireless 4 09-16-2009 04:59 PM
Resetting Admin Password NewMacFan OS X - Operating System 5 01-14-2008 01:01 AM
Screen saver password problem Biturbo V12 AMG Apple Notebooks 2 12-29-2005 05:10 AM

All times are GMT -4. The time now is 06:57 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?