Page 1 of 1 1
Topic Options
#137433 - 2005-04-07 06:29 PM Display Password Expiration Days Left
Broxoth Offline
Getting the hang of it

Registered: 2005-04-07
Posts: 78
Greetings! This is my first post so be gentle.
I have a login script that calls a display script giving users their various login info. The one thing I would like to add to this script but can't find any info on how to add it is a function that display users days remaining before their password expires. Now, I am aware that the server will inform them from 14 days on in but I have some users that log in so rarely that they won't be annoyed with this message everyday for 14 days straight which, with normal people, would be enough to just go ahead and change their bloody passwords! Here's a snippet of the display script that involves displaying the users' info:
Code:
Color y+/n
At ( 9,40) @userid
At (10,40) @fullname
At (11,40) @priv
At (12,40) @wksta
At (13,40) @domain
At (14,40) @lserver
Sleep 4
CLS



I'd prefer to just add to the bottom of the display box something like "Your password will expire in days."
Thanks everyone!!

Top
#137434 - 2005-04-07 07:19 PM Re: Display Password Expiration Days Left
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Have you tried looking in the manual for @PWAge?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#137435 - 2005-04-07 08:08 PM Re: Display Password Expiration Days Left
Broxoth Offline
Getting the hang of it

Registered: 2005-04-07
Posts: 78
Told ya I was new! Thanks Les for setting me straight. Works like a charm. Next time I won't forget to RTFM when I'm researching. Hehe!
Top
#137436 - 2005-04-07 08:23 PM Re: Display Password Expiration Days Left
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
BTW, Welcome to the board!
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#137437 - 2005-04-08 03:54 PM Re: Display Password Expiration Days Left
Broxoth Offline
Getting the hang of it

Registered: 2005-04-07
Posts: 78
Thanks! Glad to be here. I'm looking forward to learning as much as possible.

One more thing, though. Although @PWAGE works great, I'd prefer it to count down rather than display the length the password has been in use. Now, I'm sure that goes right against the whole function of @PWAGE, so I'd probably have find another way of doing it. Even though my users read and signed an Acceptable Use Policy that states how long they have until their passwords expire they still don't know. (I administrate a K-12 school network...can anyone else relate?!)
Any ideas on how to do this? If not I'll just look around for awhile and deal with it as is for now. Thanks again!

Top
#137438 - 2005-04-08 04:11 PM Re: Display Password Expiration Days Left
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
@maxpwage - @pwage
Top
#137439 - 2005-04-08 06:02 PM Re: Display Password Expiration Days Left
Broxoth Offline
Getting the hang of it

Registered: 2005-04-07
Posts: 78
I saw that but from what I could tell it just displayed the maximum days that the password COULD age. For instance 120 days and then never count down from that.
Top
#137440 - 2005-04-08 06:15 PM Re: Display Password Expiration Days Left
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
...which is why subtracting the current password age from the max password age gives you "days before password expires" hence

Code:

$daysLeft = @MaxPWAge - @PWAge
? "your password will expire in " $daysLeft " days"


Top
#137441 - 2005-04-08 06:18 PM Re: Display Password Expiration Days Left
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
What does one get if one's password never expires, I got this:

Code:

E:\>kix32 t

your password will expire in -389 days


Top
#137442 - 2005-04-08 06:25 PM Re: Display Password Expiration Days Left
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
of course that would have to be tested if it's a possibility. From the manual...

Quote:


@MaxPWAge Maximum password age (Note: if passwords are set not to expire, this value is set to ((unsigned long)-1) (or 0xFFFFFFFF in hex). This evaluates to 4294967295 decimal).




Top
#137443 - 2005-04-08 06:41 PM Re: Display Password Expiration Days Left
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
So you telling me to RTFM ? ;0)
Top
#137444 - 2005-04-08 06:47 PM Re: Display Password Expiration Days Left
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
you can read? Then yes, RTFM
Top
#137445 - 2005-04-08 06:50 PM Re: Display Password Expiration Days Left
Broxoth Offline
Getting the hang of it

Registered: 2005-04-07
Posts: 78
You know, when people work real hard to answer my questions and then I disregard the whole "- @pwage" part of their response, well....that's just stupid!
Top
#137446 - 2005-04-08 06:56 PM Re: Display Password Expiration Days Left
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Ah, well... my fault really for only giving a hint instead of the full answer... but hey, you're smarter for it now.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#137447 - 2005-04-08 06:58 PM Re: Display Password Expiration Days Left
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
well, its a good thing for you that I already rated you a five star, else I would be giving you a one star ! ;0)

Brockett, don't forget to check for those negative number thingies.

-Shawn
(just yanking your chain Eric)

Top
#137448 - 2005-04-08 07:37 PM Re: Display Password Expiration Days Left
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
Don't worry about it David...i really wouldn't call it "hard work" anyway.

Shawn, thanks for the rating. i'll never doubt your literacy again.

Top
#137449 - 2005-04-08 07:56 PM Re: Display Password Expiration Days Left
Broxoth Offline
Getting the hang of it

Registered: 2005-04-07
Posts: 78
Yeah, I thought better of my "hard work" comment after the fact, but, eh.

Shawn, clarify what you meant by the negative number thingies. Did you mean that in relation to users with non-expiring passwords?

Top
#137450 - 2005-04-08 08:17 PM Re: Display Password Expiration Days Left
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
well, JIC Shawn's literacy is challenged, I will answer for him.

Ja, it has to do with the non-expiring passwords.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#137451 - 2005-04-08 08:32 PM Re: Display Password Expiration Days Left
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
my literacy is adequate, its my available board time that aint good (see, me literate). ja, meant that stuff about the non-expiring password thingy.
Top
#137452 - 2005-04-08 09:02 PM Re: Display Password Expiration Days Left
Broxoth Offline
Getting the hang of it

Registered: 2005-04-07
Posts: 78
Well, the only people with those around here are myself and the school administrator and this script won't be applying to either of us, so we're good. Thanks everyone! The "@MaxPWAge - @PWAge" works perfectly for what I need.
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.071 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org