Samba passwords expiring in x days - how do we fix them to not expire

12,230

Solution 1

First look for

pdbedit -u $username -v

This should display every property about this particular user.

pdbedit -P "maximum password age" -C -1

This then should disable the max password age for all accounts.

Taken from: http://linuxcommand.org/man_pages/pdbedit8.html

Solution 2

I think you can use also pdbedit -u $username -c "[X]" which will add "Password does not expire" flag to specified user (and will set Password must change attribute to some point in distant future).

Share:
12,230

Related videos on Youtube

Gilles 'SO- stop being evil'
Author by

Gilles 'SO- stop being evil'

Updated on September 18, 2022

Comments

  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' almost 2 years

    We use OpenLDAP and Samba v3. Recently some Samba-defined users (no accounts on the shared linux server) started being listed in logwatch as having their passwords come up to "will expire"...I changed the names.

       password for user unicorn will expire in 7 days: 1 Time(s)
       password for user xMacAlphbet will expire in 7 days: 1 Time(s)
       password for user klbomb will expire in 4 days: 1 Time(s)
    

    None of thee users have a linux user account. How can I fix these?

    • Admin
      Admin over 10 years
      are you using pwdPolicy schema in LDAP?