Home Forums OS X Server and Client Discussion Open Directory changing users’ passwords via command line

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #358818
    nbirnbaum
    Participant

    Hey 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

    #358978
    nbirnbaum
    Participant

    Thanks, 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,
    Noam

    #359267
    Anonymous
    Guest

    Along 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!

    #359268
    cnicholson
    Participant

    Sorry, this was mine, I hadn’t registererd yet. Smile

    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 passwd

    Thoughts?

    Thanks,

    #366528
    Darkomen
    Participant

    I 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 ?

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Comments are closed