Home › Forums › OS X Server and Client Discussion › Open Directory › changing users’ passwords via command line
- This topic has 6 replies, 4 voices, and was last updated 18 years, 9 months ago by
Darkomen.
-
AuthorPosts
-
August 18, 2004 at 2:19 am #358818
nbirnbaum
ParticipantHey all,
Slow but steady progress on my command line odyssey… thank god I’m being paid for this… When I’m finished I will write up a full tutorial on how to create new users via the command line in Panther Server. In the meantime…
How do you change users’ email passwords in Terminal?
The passwd command will change their file sharing passwords, but not for email. These are LDAP users, so
dscl . create /Users/username passwd
will not work because passwd is not a valid LDAP attribute.
That is the most pressing issue. In the meantime, if I’m only providing mail, web, AFP, and Samba services on this box, do I really need to care whether users use crypt or Open Directory passwords? And if I really should care, is there a way to change a user from crypt to OD password via the command line?
Oy vey. Thanks so much–
Noam
September 2, 2004 at 9:46 pm #358978nbirnbaum
ParticipantThanks, Joel. As it turns out, passwd wasn’t working because of misconfigured DNS and hence misconfigured Kerberos.
So okay. passwd works. But.
I’m trying to figure out how to set a user’s password type from Crypt to Open Directory via the command line. I’ve tried duplicating a valid user’s AuthenticationAuthority attribute to another user via dscl but no dice. Any genius suggestions?
Thanks,
NoamSeptember 21, 2004 at 11:26 pm #359267Anonymous
GuestAlong these lines…
I’m trying to get a way to script passwd and am having less than great luck. Let’s say I have a csv file filled with users that I CURRENTLY HAVE IN OPEN DIRECTORY (just wanting to be clear…) and I want to assign them passwords. Like this: csv file includes: username,passwd or similar, I have usernames currently in OD, just want to change the passwords. Thoughts? I think I’m just getting stuck at the scripting passwd point. Thoughts/shell scripts?
THANKS!
September 21, 2004 at 11:40 pm #359268cnicholson
ParticipantSorry, this was mine, I hadn’t registererd yet.

All I really care about is whatever syntax I need to script passwd.. .
It needs to end up exectuing: sudo passwd user1
-> passwd1
-> passwd1
-> admin passwdThoughts?
Thanks,
June 29, 2006 at 1:24 pm #366528Darkomen
ParticipantI want to do the same things 😮
Script the make aof a new user, and so, put a password on his account.
[code]
–creation du dossier Home (vide)do shell script (“mkdir ” & “~/” & text returned of varlogin)
–creation de l’utilisateur dans la base NetInfo
do shell script (“sudo dscl localhost -create /NetInfo/root/Users/” & text returned of varlogin & ” UserShell /bin/bash”)
do shell script (“sudo dscl localhost -create /NetInfo/root/Users/” & text returned of varlogin & ” HomeDirectory ~/” & text returned of varlogin)
do shell script (“sudo dscl localhost -create /NetInfo/root/Users/” & text returned of varlogin & ” UniqueID 800″)[/code]that’s not really my finished script, its on test, i want to make several new account with it.
yes in apple script, i do other thing after and before that…[b]do shell script (“sudo passwd ???? <- what i do here ?[/b] so.... how can i put in the script a password on that new account ?
-
AuthorPosts
- You must be logged in to reply to this topic.

Comments are closed