Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to setup a Samba server which asks new users to change their password on their first login and makes passwords expire after 90 days.

I was able to setup the 90 days expiry date but the --pwd-must-change-time doesn't work.

The verbose shows as the data was changed but when I run -Lv it still shows the “must change time” for 90 days ahead.

share|improve this question
1  
How does changing your password every 90 days increase security? (Answer: generally speaking, it doesnt'.) –  Gilles Dec 2 '11 at 23:43
    
@Gilles, thanks for your reply but I don't recall stating I was trying to increase security. It's just a feature I'd like to add so I don't have to manage that. But anyway, I was able to setup the 90 days expiry date and also setup user to change their password on first logon. My new problem is: Windows-XP doesn't prompt for user's new password. It only tells them they must change their password. How can I enable users to change their passwords from Windows XP? –  Sidney de Moraes Dec 5 '11 at 15:04
    
The exact error message is: System error 1907 has occurred. The user's password must be changed before logging on the first time. –  Sidney de Moraes Dec 5 '11 at 15:06
    
That's a different question. Since you've found an answer to your original question, please share it (use the “Answer Your Question” button). For the Windows XP part, we on the Unix site can't help, I suggest you ask on Super User (a site for users of Windows and Linux) or Server Fault (a site for professional system administrators). –  Gilles Dec 5 '11 at 16:49
    
@Giles: wow, thanks for the update. I actually had posted my question at stackflow, not here. Someone migrated it. I'll add the answer to the original question. Thanks. –  Sidney de Moraes Dec 5 '11 at 16:55
add comment

migrated from stackoverflow.com Dec 2 '11 at 19:21

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 1 down vote accepted

I found a solution to my original question.

At first you can set up the 90-day-expiration policy like I did.

sudo pdbedit -P "maximum password age" -C *time-in-seconds*

Then in order to make the user change his password at first login just type

sudo net sam set pwdmustchangenow *user* yes

The problem I'm having now is that Windows does not allow a user to change their password. It only alerts them that they need to change their password. I'm posting a new question about this new error.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.