Problem with csuite change password routine

Date: Mon, 17 Feb 1997 17:15:59 -0400
From: David Priebe <priebe@board1.renfrew.edu.on.ca>
To: david@cs.dal.ca
CC: csuite-tech@chebucto.ns.ca, priebe@renfrew.edu.on.ca
Precedence: bulk

next message in archive
next message in thread
previous message in archive
previous message in thread
Index of Subjects

Index of Subjects

>From: David Trueman <david@cs.dal.ca>
>Subject: Re: Problem with csuite change password routine
>
>Sorry about the delay in replying.  Try replacing your

No problem.  
I replaced my passwd-batch with the one you sent, and accounts still get
activated, but passwords don't get changed yet.  Also, I didn't get any mail
messages sent to either office or root.  I included test.passwd-batch maybe
it's a problem with the way the password change is being recorded.
Thanks again,
Here is test.passwd-batch 

+ newacct-make
+ cd /csuite/.passwd
++ echo david
+ files=david
+ lock /csuite/private/passwd/lock 23285
+ :
+ rm -f /csuite/private/passwd/pw.23285
+ cp /dev/null /csuite/private/passwd/pw.23285
+ chmod 600 /csuite/private/passwd/pw.23285
+ [ -f /etc/master.passwd ]
+ [ -f /etc/shadow ]
+ pwdfile=/etc/passwd
+ ls -l
++ pwd
+ gawk -v pwdfile=/etc/passwd 
NR == 1 { next }
(NF < 8 || NF > 9) || $3 != $NF || $1 != "----------" {
        print "Suspicious file in /csuite/.passwd: " $0
        getline contents <$NF
        print "Contents: " contents
        next
}
{
        file = $NF
        FS = ":"
        if (getline <file <= 0) {
                print "Unable to read " file " or empty file."
                next
        }
        if ($1 != file) {
                print "Mismatch: " file, $0
                next
        }
        old[$1] = $2
        new[$1] = $3
        didone = 1
        FS = " "
}
END {
        if (!didone)
                exit
        FS = ":"
        while (getline <pwdfile >0) {
            if ($1 in old && old[$1] == $2) {
                print "CMD:p:" $1 ":" new[$1] 
>"/csuite/private/passwd/pw.23285"                deletes = deletes " " $1
                delete old[$1]
            }
        }
        for (i in old) {
                print "Leftover: " i
        }
        system("rm -f " deletes)
}

+ mail_output root passwd-batch output
gawk: cmd. line:32: >"/csuite/private/passwd/pw.23285"                deletes = deletes " " $1
gawk: cmd. line:32: ^ parse error
+ echo From: office
To: david
Subject: password change failed

Your attempted password change failed for unknown reasons.
Please try again.

+ /usr/lib/sendmail -f office
+ rm -f david
+ unlock /csuite/private/passwd/lock 23285
+ mkcustom

This is test.passwd_edit
+ cd /csuite/private/passwd
++ echo pw.23285
+ files=pw.23285
+ lock /csuite/private/passwd/lock 23326
+ :
+ umask 077
+ :
+ ln /etc/ptmp.23326 /etc/ptmp
+ touch /etc/passwd~ /etc/passwd~~
+ chmod 600 /etc/passwd~ /etc/passwd~~
+ mv /etc/passwd~ /etc/passwd~~
+ [ -f /etc/master.passwd ]
+ [ -f /etc/shadow ]
+ cp /etc/passwd /etc/passwd~
+ gawk -F: -f /csuite/lib/passwd.awk pw.23285 /etc/passwd
+ cp /etc/ptmp /etc/passwd
+ rm -f /etc/ptmp /etc/ptmp.23326
+ break
+ mv pw.23285 save
+ unlock /csuite/private/passwd/lock 23326

>On Thu, 13 Feb 1997, David Priebe wrote:
>
>> I am now having a problem with the csuite change password routine.  I can
>> fill out the form ok, and get the appropriate message, but when passwd-batch
>> tries to change the password, the "office" alias get's mailed a message saying
>> there was an unknown problem.
>
>  David Trueman,
>    Systems Manager, Dalhousie Math, Stats and Computing Science
>    Technical Chair, Chebucto Community Net

---------------------------------------------------------------------------
|      David Priebe               |       President                       |
| System's & Network Analyst      |       ValleyNet (Renfrew County) Inc. |
| Renfrew County Board of Ed.     |       "Renfrew County's Freenet!"     |
| priebe@renfrew.edu.on.ca        |       priebe@valleynet.on.ca          |
| http://www.renfrew.edu.on.ca    |       http://www.valleynet.on.ca/     |
---------------------------------------------------------------------------


next message in archive
next message in thread
previous message in archive
previous message in thread
Index of Subjects