User change password after login

Hi guys,
Is there an option that requires user change their password after first login, after user created with a initial password?
I am asking this because we are migrating from Zentyal to Nethserver and we have more than 150 users and we have to create one by one and we’re creating a default password for each user to type when they log in for the first time. In zentyal it had the samba-tool user setpassword ‘user’ --must-change-at-next-login command but in nethserver it does not have

NethServer Version: 7.4.1708 (Final)

Hi @Wellington_Rodrigues,

you have it on NethServer but it’s inside the container. You can run the command like this:

systemd-run -M nsdc -t /bin/bash -c "samba-tool user setpassword ‘user’ --must-change-at-next-login"

You may have a shell inside the container too and use samba-tool directly:

https://wiki.nethserver.org/doku.php?id=howto:useful_commands#have_a_shell_inside_the_nsdc_container

1 Like

Hi @mrmarkuz,
I followed in his footsteps but it did not work.
Well, the command worked but when I log in with the username and password nothing happens. Does not ask to change password

systemd-run -M nsdc -t /bin/bash -c "samba-tool user setpassword adrianac --must-change-at-next-login"
Running as unit run-15566.service.
Press ^] three times within 1s to disconnect TTY.
New Password:
Retype Password:
Changed password OK

I could only manage it with RSAT tools, tried samba-tool and pdbedit but no success…

It’s on the todo list: