Results 1 to 5 of 5
  1. #1

    Member Since
    Dec 26, 2009
    how to reset user's password using command line?
    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!


  2. #2

    Member Since
    Dec 24, 2009
    passwd will Modify a user password.

    for a handy list of commands

  3. #3

    Member Since
    Dec 26, 2009
    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.

  4. #4

    Dysfunction's Avatar
    Member Since
    Mar 17, 2008
    Tucson, AZ
    Way... way too many specs to list.
    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.
    This machine kills fascists
    Got # ? phear the command line!

  5. #5

    Member Since
    Dec 26, 2009

    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:

    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....


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Compare OS X command line to Linux command line?
    By V6Pony in forum macOS - Development and Darwin
    Replies: 5
    Last Post: 09-26-2013, 12:32 PM
  2. Reset User password in server app not working
    By ashdatla in forum Other Hardware and Peripherals
    Replies: 0
    Last Post: 05-20-2013, 10:40 AM
  3. Foundation Command Line
    By niatuom in forum macOS - Development and Darwin
    Replies: 2
    Last Post: 08-18-2011, 01:05 PM
  4. Is there a command line like this?
    By Downy in forum macOS - Operating System
    Replies: 13
    Last Post: 02-27-2011, 04:29 PM
  5. Booting to command line environment in multi-user mode?
    By AlexN in forum macOS - Operating System
    Replies: 2
    Last Post: 02-26-2006, 04:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts