Home > Mac administration, Mac OS X Server > Changing your OS X Server password from a Linux or Unix box.

Changing your OS X Server password from a Linux or Unix box.

Somebody recently asked me if I knew a way to change a OS X Server password from a Linux box. I said that I had a way to change them via a webpage, but I didn’t know of another way. I thought about that some more, and decided to double-check that. The good news is that you can, and in a really simple way. This way of changing makes the following assumptions: 
1. Your password is not set on the server to be changed before the next login (i.e. you haven’t been sent a temp password whose sole use is to act as a means to change to a new password. That’s the main reason I set up a web-based password change page, as it does allow for this situation.) 
2. You’re connected to the server via SSH. 
If your user has both of those assumptions covered, here’s how you change your account’s password. 
1. Log into the server via SSH. 
2. Type “passwd (account shortname)” For instance, in the case of a user whose shortname is test, it would be “passwd test” 
3. It’ll ask you for your old password, then ask you to enter a new password and verify it. The password rules that govern this are the same ones you have set on your server. 
What you should see in your terminal program: 
My-Box:~ rtrouton$ ssh test@servername 
servername:~ test$ passwd test 
Changing password for test. 
Old password: 
New password: 
Retype new password: 
servername:~ test$ 
Log out, and try logging back in. It should now require the new password to log in, and that will now apply to all the services available to that account on that server. I tested this on an XServe running Server 10.3.9, and it should work on Server 10.4.x as well. 
One additional item to note: changing your password from the command-line will not update your Keychain with the new password. If you sometimes access this box remotely via SSH and other times from the main login screen, you’re better off changing it through System Preferences: Accounts. That goes double if you’re using FileVault to secure your account on the server. 

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: