Specify a user-password using terminal which works for all services

I need to be able to change some users passwords automatically with a script… is there a possibility to set a users password from the commandline without any interaction so it is a normal user-password as if it was entered on user-creation uisng the web-gui?

Hey,

this can be done via the UDM CLI:

root@pdn:~# udm users/user modify --dn "uid=testy,dc=test,dc=intranet" --set password=NewPassword
Object modified: uid=testy,dc=test,dc=intranet

Best regards
Jan-Luca

1 Like

how can I use the “Override password history” known from the WebGUI? I cannot find any documentation about the “–set password” -options

ok. found it in help now… its this;
–set overridePWHistory=1

1 Like

Glad you found it yourself, regarding other attributes you can get a list via udm users/user --help:

root@pdn:~ udm users/user --help
univention-directory-manager: command line interface for managing UCS
copyright (c) 2001-2022 Univention GmbH, Germany

...


users/user variables:
  General:
        User account
                title                                    Title
                firstname                                First name
                lastname (c)                             Last name
                username (cmr)                           User name
                description                              Description
                divisNickname                            Nickname
                divisNameAffix                           Name affix
                password (c)                             Password
                overridePWHistory                        Override password history
                overridePWLength                         Override password check
...

Best regards
Jan-Luca

1 Like
Mastodon