Rowland Penny
2015-May-08 11:57 UTC
[Samba] Smba 4, looking for a command to show the password expiration date
On 08/05/15 12:49, Mario Pio Russo wrote:> Hi all > > just going back to this, Steve can you please expalin where did you take > this number from? 11644473600 > > that seems not to work correctly on my system so I was lookin g how to > tailor down the right value > > thanks > > > ___________________________________________________________________________________________ > > Mario Pio Russo, System Admin SWG IT Services Dublin, Phone & FAX: +353 1 > 815 2236, eMail: mariopiorusso at ie.ibm.com > IBM Ireland Product Distribution Limited registered in Ireland with number > 92815. Registered Office: IBM House, Shelbourne Road, Ballsbridge, Dublin 4 > > (Embedded image moved to file: pic41433.gif) > > > > From: Mario Pio Russo/Ireland/IBM at IBMIE > To: Steve Thompson <smt at vgersoft.com> > Cc: samba at lists.samba.org, samba-bounces at lists.samba.org > Date: 06/05/2015 14:44 > Subject: Re: [Samba] Smba 4, looking for a command to show the password > expiration date > Sent by: samba-bounces at lists.samba.org > > > > great thanks Steve > ___________________________________________________________________________________________ > > > Mario Pio Russo, System Admin SWG IT Services Dublin, Phone & FAX: +353 1 > 815 2236, eMail: mariopiorusso at ie.ibm.com > IBM Ireland Product Distribution Limited registered in Ireland with number > 92815. Registered Office: IBM House, Shelbourne Road, Ballsbridge, Dublin 4 > > (Embedded image moved to file: pic38171.gif) > > > > From: Steve Thompson <smt at vgersoft.com> > To: Mario Pio Russo/Ireland/IBM at IBMIE > Cc: samba at lists.samba.org > Date: 06/05/2015 14:25 > Subject: Re: [Samba] Smba 4, looking for a command to show the > password > expiration date > Sent by: samba-bounces at lists.samba.org > > > > On Wed, 6 May 2015, Mario Pio Russo wrote: > >> I am developing a tool in perl to run on my sabma4-DC. This tool must > check >> the password exp date and send a reminder when quite close. Now in order > to >> do that, I need a command to extract the expiration date from samba 4. > Extract the value of the password lifetime into the LIFETIME variable: > > LIFETIME=`samba-tool domain passwordsettings show > | \ > grep "^Maximum password > age (days):" | awk '{print > $5}'` > > and then, for the user in question, extract the value of pwdLastSet into > LASTSET (perhaps from ldbsearch), and then: > > LASTSET=$((LASTSET/10000000)) > LASTSET=$((LASTSET-11644473600)) > EXPIRES=$((LASTSET+3600*24*LIFETIME)) > EXPIRESSTR=`date -d @$EXPIRES` > echo "Password expires $EXPIRESSTR" > > -Steve > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba > >The number is correct, have a look here: http://www.adminsys.ch/2013/07/31/convert-active-directory-pwdlastset-attribute-readable-time/ Rowland
Mario Pio Russo
2015-May-08 15:20 UTC
[Samba] Smba 4, looking for a command to show the password expiration date
thanks Rowland! btw, when will samba 4.2.2 released? looking foward to it! (I need the bug of the RDP fixed :D) thanks! ___________________________________________________________________________________________ Mario Pio Russo, System Admin SWG IT Services Dublin, Phone & FAX: +353 1 815 2236, eMail: mariopiorusso at ie.ibm.com IBM Ireland Product Distribution Limited registered in Ireland with number 92815. Registered Office: IBM House, Shelbourne Road, Ballsbridge, Dublin 4 (Embedded image moved to file: pic30167.gif) From: Rowland Penny <rowlandpenny at googlemail.com> To: samba at lists.samba.org Date: 08/05/2015 12:59 Subject: Re: [Samba] Smba 4, looking for a command to show the password expiration date Sent by: samba-bounces at lists.samba.org On 08/05/15 12:49, Mario Pio Russo wrote:> Hi all > > just going back to this, Steve can you please expalin where did you take > this number from? 11644473600 > > that seems not to work correctly on my system so I was lookin g how to > tailor down the right value > > thanks > > >___________________________________________________________________________________________> > Mario Pio Russo, System Admin SWG IT Services Dublin, Phone & FAX: +353 1 > 815 2236, eMail: mariopiorusso at ie.ibm.com > IBM Ireland Product Distribution Limited registered in Ireland withnumber> 92815. Registered Office: IBM House, Shelbourne Road, Ballsbridge, Dublin4> > (Embedded image moved to file: pic41433.gif) > > > > From: Mario Pio Russo/Ireland/IBM at IBMIE > To: Steve Thompson <smt at vgersoft.com> > Cc: samba at lists.samba.org, samba-bounces at lists.samba.org > Date: 06/05/2015 14:44 > Subject: Re: [Samba] Smba 4, looking for a command to show thepassword> expiration date > Sent by: samba-bounces at lists.samba.org > > > > great thanks Steve >___________________________________________________________________________________________> > > Mario Pio Russo, System Admin SWG IT Services Dublin, Phone & FAX: +353 1 > 815 2236, eMail: mariopiorusso at ie.ibm.com > IBM Ireland Product Distribution Limited registered in Ireland withnumber> 92815. Registered Office: IBM House, Shelbourne Road, Ballsbridge, Dublin4> > (Embedded image moved to file: pic38171.gif) > > > > From: Steve Thompson <smt at vgersoft.com> > To: Mario Pio Russo/Ireland/IBM at IBMIE > Cc: samba at lists.samba.org > Date: 06/05/2015 14:25 > Subject: Re: [Samba] Smba 4, looking for a commandto show the> password > expiration date > Sent by: samba-bounces at lists.samba.org > > > > On Wed, 6 May 2015, Mario Pio Russo wrote: > >> I am developing a tool in perl to run on my sabma4-DC. This tool must > check >> the password exp date and send a reminder when quite close. Now in order > to >> do that, I need a command to extract the expiration date from samba 4. > Extract the value of the password lifetime into the LIFETIME variable: > > LIFETIME=`samba-tooldomain passwordsettings show> | \ >grep "^Maximum password> age (days):" | awk '{print > $5}'` > > and then, for the user in question, extract the value of pwdLastSet into > LASTSET (perhaps from ldbsearch), and then: > > LASTSET=$((LASTSET/10000000))> LASTSET=$((LASTSET-11644473600))> EXPIRES=$((LASTSET+3600*24*LIFETIME))> EXPIRESSTR=`date -d@$EXPIRES`> echo "Password expires$EXPIRESSTR"> > -Steve > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba > >The number is correct, have a look here: http://www.adminsys.ch/2013/07/31/convert-active-directory-pwdlastset-attribute-readable-time/ Rowland -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Rowland Penny
2015-May-08 16:33 UTC
[Samba] Smba 4, looking for a command to show the password expiration date
On 08/05/15 16:20, Mario Pio Russo wrote:> thanks Rowland! > > btw, when will samba 4.2.2 released? looking foward to it! (I need the bug > of the RDP fixed :D) > > thanks! > ___________________________________________________________________________________________ > > Mario Pio Russo, System Admin SWG IT Services Dublin, Phone & FAX: +353 1 > 815 2236, eMail: mariopiorusso at ie.ibm.com > IBM Ireland Product Distribution Limited registered in Ireland with number > 92815. Registered Office: IBM House, Shelbourne Road, Ballsbridge, Dublin 4 > > (Embedded image moved to file: pic36166.gif) > > > > From: Rowland Penny <rowlandpenny at googlemail.com> > To: samba at lists.samba.org > Date: 08/05/2015 12:59 > Subject: Re: [Samba] Smba 4, looking for a command to show the password > expiration date > Sent by: samba-bounces at lists.samba.org > > > > On 08/05/15 12:49, Mario Pio Russo wrote: >> Hi all >> >> just going back to this, Steve can you please expalin where did you take >> this number from? 11644473600 >> >> that seems not to work correctly on my system so I was lookin g how to >> tailor down the right value >> >> thanks >> >> >> > ___________________________________________________________________________________________ > >> Mario Pio Russo, System Admin SWG IT Services Dublin, Phone & FAX: +353 1 >> 815 2236, eMail: mariopiorusso at ie.ibm.com >> IBM Ireland Product Distribution Limited registered in Ireland with > number >> 92815. Registered Office: IBM House, Shelbourne Road, Ballsbridge, Dublin > 4 >> (Embedded image moved to file: pic41433.gif) >> >> >> >> From: Mario Pio Russo/Ireland/IBM at IBMIE >> To: Steve Thompson <smt at vgersoft.com> >> Cc: samba at lists.samba.org, samba-bounces at lists.samba.org >> Date: 06/05/2015 14:44 >> Subject: Re: [Samba] Smba 4, looking for a command to show the > password >> expiration date >> Sent by: samba-bounces at lists.samba.org >> >> >> >> great thanks Steve >> > ___________________________________________________________________________________________ > >> >> Mario Pio Russo, System Admin SWG IT Services Dublin, Phone & FAX: +353 1 >> 815 2236, eMail: mariopiorusso at ie.ibm.com >> IBM Ireland Product Distribution Limited registered in Ireland with > number >> 92815. Registered Office: IBM House, Shelbourne Road, Ballsbridge, Dublin > 4 >> (Embedded image moved to file: pic38171.gif) >> >> >> >> From: Steve Thompson <smt at vgersoft.com> >> To: Mario Pio Russo/Ireland/IBM at IBMIE >> Cc: samba at lists.samba.org >> Date: 06/05/2015 14:25 >> Subject: Re: [Samba] Smba 4, looking for a command > to show the >> password >> expiration date >> Sent by: samba-bounces at lists.samba.org >> >> >> >> On Wed, 6 May 2015, Mario Pio Russo wrote: >> >>> I am developing a tool in perl to run on my sabma4-DC. This tool must >> check >>> the password exp date and send a reminder when quite close. Now in order >> to >>> do that, I need a command to extract the expiration date from samba 4. >> Extract the value of the password lifetime into the LIFETIME variable: >> >> LIFETIME=`samba-tool > domain passwordsettings show >> | \ >> > grep "^Maximum password >> age (days):" | awk '{print >> $5}'` >> >> and then, for the user in question, extract the value of pwdLastSet into >> LASTSET (perhaps from ldbsearch), and then: >> >> LASTSET=$ > ((LASTSET/10000000)) >> LASTSET=$ > ((LASTSET-11644473600)) >> EXPIRES=$((LASTSET > +3600*24*LIFETIME)) >> EXPIRESSTR=`date -d > @$EXPIRES` >> echo "Password expires > $EXPIRESSTR" >> -Steve >> -- >> To unsubscribe from this list go to the following URL and read the >> instructions: https://lists.samba.org/mailman/options/samba >> >> >> -- >> To unsubscribe from this list go to the following URL and read the >> instructions: https://lists.samba.org/mailman/options/samba >> >> > The number is correct, have a look here: > > http://www.adminsys.ch/2013/07/31/convert-active-directory-pwdlastset-attribute-readable-time/ > > > Rowland > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba > >well, if you look here: https://wiki.samba.org/index.php/Release_Planning_for_Samba_4.2 It says 27th May, that is all I know, I am just a user like your self :-)
Reasonably Related Threads
- Smba 4, looking for a command to show the password expiration date
- Smba 4, looking for a command to show the password expiration date
- Smba 4, looking for a command to show the password expiration date
- Smba 4, looking for a command to show the password expiration date
- Samba 4 - disabling SSLv3 to mitigate POODLE effects