How do I stop Windows filesharing passwords from expiring?
May 4, 2006 7:53 AM   Subscribe

How do I stop passwords from expiring in my home Windows XP / Linux (Samba) network?

I have file sharing working reasonably well from my Linux box to Windows XP. Linux is running Debian/Testing with Samba. But every two weeks someone decides my password is no good anymore and I have to change it. When I open the fileshare I encounter a dialog demanding I change my password. The change password dialog does not work. I can fake it out by logging into the Linux box and running smbpasswd, but that's a nuisance. Who is deciding the password expired and, more importantly, how do I turn it off?

While I'm here, I'd be grateful for pointers to a good online reference for configuring Windows filesharing. I've got the basic Linux/Windows thing working but I still can't share files between Windows boxes on my network. Is there something that explains all about domains and hosts and Windows network security without requiring a 10 hour course in network hell?
posted by Nelson to Computers & Internet (7 answers total)
 
From the Windows box, go to Start>Run, type lusrmgr.msc in the box and hit enter.
Select the Users folder on the left and double-click the account in question on the right.
Check the Password never expires box and click OK.
posted by pmbuko at 8:30 AM on May 4, 2006


Response by poster: pmbuko; I've already got "Password never expires" checked, thank you though. I think my Linux file server is somehow deciding I need to change my password, not my Windows client. But despite lots of searching for Samba info I've not been able to find a solution.
posted by Nelson at 8:43 AM on May 4, 2006


Best answer: It's definitely the linux box that is expiring the password. The problem is that there are different ways that samba can handle authentication, and so different places to look. And it gets more difficult if samba is acting as a domain controller. But since smbpasswd works, it sounds like you might be able to get around figuring out any of that by using pdbedit. Try this command (replace username with your login name):

pdbedit -u username -c "[X ]"

That should tell samba to set the password not to expire. You can try a "pbdedit -v -u username" to see what expiration information is in there right now.
posted by team lowkey at 3:34 PM on May 4, 2006


Oops. Typo in that second command. Why isn't pdbedit in the spell checker?!?
;)
posted by team lowkey at 3:41 PM on May 4, 2006


Response by poster: Thanks for the help, team lowkey. Alas, apparently I don't have that flavour of Samba authentication:
Unable to open/create TDB passwd
pdb_getsampwnam: Unable to open TDB passwd (/var/lib/samba/passdb.tdb)!
Username not found!
posted by Nelson at 7:53 PM on May 4, 2006


Best answer: Oh well. Did you run the command as root? What's the passdb backend in smb.conf?
posted by team lowkey at 2:16 AM on May 5, 2006


Response by poster: root! That did it, thank you, team lowkey. For future reference, the "-c '[X ]'" is pdbedit's highly intuitive way of saying "set the flag for this account so that passwords never expire".
posted by Nelson at 9:18 AM on May 5, 2006


« Older Energy, Lots of Energy   |   Win XP - Some apps won't open files in root... Newer »
This thread is closed to new comments.