[Samba] Set password expiration date

Marco De Vitis starless at spin.it
Fri Aug 27 07:29:27 MDT 2010

I'm using Samba 3.2.5 on Debian Lenny, and I need to set the password 
for a certain user to expire on a specific date (not "now", it's a date 
in the future).

When I was on Debian Etch I could use this:

pdbedit -r -u user --time-format=%d-%m-%Y --pwd-must-change-time=<date>

But it seems this option for pdbedit is not available anymore in the 
Samba version included in Lenny.

I've read elsewhere about using this as a replacement:

net sam set pwdmustchangenow <user> yes

...but this sets the expiration date to NOW, which is not what I want.

How can I achieve what I need?

Using a cron job for planning a "net sam" command would give a different 
result, because the user would not be warned in advance about her 
password going to expire.

Thank you.


More information about the samba mailing list