graham@DRCVAX.ARPA (09/28/87)
I tried to send this to Lisa Brosseau, but couldn't make contact via Arpanet on any of the three addresses she listed. I'm posting it to the net because others may be having her difficulties. Although I am offering a differnt source code for the program to force password changes, I do not intend this to in any denegrate the PASS program nor it's author, it's simply a different approach to the same end. --Dan ........................................................................... Lisa, I can't exactly explain why you are having this problem, but I have a little bit different way of doing the PASS work. First, I wrote my own force-them-to-set-password program which tested for both conditions of expired password, and a never used account. I execute the SET PASSWORD command from within the program, avoiding the extra commands of the command procedure. I do it with the LIB$SPAWN command, then recheck the status of the password. If it's changed, I exit, if not, I make it rerun...they can't get out without doing a valid change of their password. The portion of code in the SYSLOGIN.COM that runs it for every user follows $ SET NOCONTROL_Y $ SET NOON $ ASSIGN/NOLOG 'F$LOGICAL("TT") SYS$INPUT $ RUN SYS$SYSTEM:NEWPASS $ DEASSIGN SYS$INPUT $ SET ON I just tried it again on a test account I have, and you can't ctrl/y out of it for love nor money. I'll include here the source of my NEWPWD.FOR program. If you don't need/want it, just throw it away, won't hurt my feelings a bit. I hope some of this helps. Dan Graham GRAHAM@DRCVAX.ARPA .......................................................................... C This program checks to see if a user is logging in for the first time, or C if the password has expired, and they are logging in on the 'one shot grace C period.' If either is true, the SET PASSWORD utility is run automatically, C ensuring that it is done and not forgotton. C PROGRAM NEWPWD INTEGER*4 SYS$GETUAI,STATUS,LIB$BBSSI,SYS$GETJPI,LIB$SPAWN INCLUDE '($UAIDEF)' INCLUDE '($JPIDEF)' STRUCTURE /ITMLST/ UNION MAP INTEGER*2 BUFLEN,ITMCOD INTEGER*4 BUFADR,RETADR END MAP MAP INTEGER*4 END_LIST END MAP END UNION END STRUCTURE RECORD /ITMLST/ UAI_LIST(3) RECORD /ITMLST/ JPI_LIST(3) CHARACTER*12 USERNAME CHARACTER*12 COMMAND/'SET PASSWORD'/ INTEGER*4 FLAG,PWDDATE(2),BIT/9/,PID/0/,MODE JPI_LIST(1).BUFLEN = 12 JPI_LIST(1).ITMCOD = JPI$_USERNAME JPI_LIST(1).BUFADR = %LOC(USERNAME) JPI_LIST(1).RETADR = 0 JPI_LIST(2).BUFLEN = 4 JPI_LIST(2).ITMCOD = JPI$_MODE JPI_LIST(2).BUFADR = %LOC(MODE) JPI_LIST(2).RETADR = 0 JPI_LIST(3).END_LIST = 0 UAI_LIST(1).BUFLEN = 4 UAI_LIST(1).ITMCOD = UAI$_FLAGS UAI_LIST(1).BUFADR = %LOC(FLAG) UAI_LIST(1).RETADR = 0 UAI_LIST(2).BUFLEN = 8 UAI_LIST(2).ITMCOD = UAI$_PWD_DATE UAI_LIST(2).BUFADR = %LOC(PWDDATE) UAI_LIST(2).RETADR = 0 UAI_LIST(3).END_LIST = 0 C Get the username from $GETJPI STATUS = SYS$GETJPIW(,PID,,JPI_LIST,,,) IF (MODE .NE. JPI$K_INTERACTIVE) GOTO 999 C Get the password status and last login date from the UAF file STATUS = SYS$GETUAI(,,USERNAME,UAI_LIST,,,) 5 IF (LIB$BBSSI(BIT,FLAG) .OR. PWDDATE(1) .EQ. -1) THEN PRINT 10 STATUS = LIB$SPAWN(COMMAND,,,,,,,,,,,) C If password not set correctly, or user tries to abort, it will repeat STATUS = SYS$GETUAI(,,USERNAME,UAI_LIST,,,) GOTO 5 ENDIF 10 FORMAT(/,1X,'SET PASSWORD is being run automatically for you',//) 999 END ------