From 08b2fa0f6ff6c30b9de29c8e4cb6a49d01070805 Mon Sep 17 00:00:00 2001 From: eknauel Date: Fri, 12 Nov 2004 13:13:58 +0000 Subject: [PATCH] support for linux --- examples/passwd-wrapper.scm | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/examples/passwd-wrapper.scm b/examples/passwd-wrapper.scm index d5f1fe8..cd4ba40 100755 --- a/examples/passwd-wrapper.scm +++ b/examples/passwd-wrapper.scm @@ -96,7 +96,7 @@ Please choose a password with at least 2 character classes.") (cond ((string=? systype "sun4x_59") 'solaris) ((string=? systype "i386_fbsd52") 'freebsd) - ((string=? systype "i386_linux24") 'linux) + ((string=? systype "i386_rh90") 'linux) (else (raise-unsupported-machine))))) ;; *** general password interface ************************************ @@ -226,17 +226,22 @@ Please choose a password with at least 2 character classes.") "Password incorrect while getting initial ticket" "Password mismatch while reading password" "Password changed.")) -;; ((linux) (define-passwd "/afs/wsi/i386_rh90/heimdal-0.6/bin/kpasswd" -;; ;; TODO -;; )) - )) + ((linux) (define-passwd "/afs/wsi/i386_rh90/heimdal-0.6/bin/kpasswd" + "Password: " + "New password: " + "Verifying - New password: " + "kpasswd: Password incorrect" + "Verify failure" + "Success")))) (define kerbv-programs (case system-type ((freebsd) (cons "/afs/wsi/i386_fbsd52/heimdal-1.6/bin/klist" "/afs/wsi/i386_fbsd52/heimdal-1.6/bin/kinit")) ((solaris) (cons "/afs/wsi/sun4x_58/heimdal-0.6/bin/klist" - "/afs/wsi/sun4x_58/heimdal-0.6/bin/kinit")))) + "/afs/wsi/sun4x_58/heimdal-0.6/bin/kinit")) + ((linux) (cons "/afs/wsi/i386_rh90/heimdal-0.6/bin/klist" + "/afs/wsi/i386_rh90/heimdal-0.6/bin/kinit")))) (define (verify-kerbv-password password) (verify-password kerberos-v password)) @@ -284,6 +289,7 @@ Please choose a password with at least 2 character classes.") "Retype new password: " ;; Attention: the old password is checked AFTER the ;; new password is entered! So verify will not work! + ;; However: changing old-pw to old-pw works fine "kpasswd: Incorrect old password." "Mismatch" "Password changed.")) @@ -294,10 +300,16 @@ Please choose a password with at least 2 character classes.") "kpasswd: Incorrect old password." "Mismatch" "Password changed.")) -;; ((linux) (define-passwd "/usr/bin/kpasswd" -;; ;; TODO -;; )) - )) + ((linux) (define-passwd "/afs/wsi/i386_rh90/openafs-1.2.11/bin/kpasswd" + "Old password: " + (rx "New password (RETURN to abort): ") + "Retype new password: " + ;; Attention: the old password is checked AFTER the + ;; new password is entered! So verify will not work! + ;; However: changing old-pw to old-pw works fine + "kpasswd: Incorrect old password." + "Mismatch" + "Password changed.")))) (define (change-afs-password old-pw new-pw) (change-password afs old-pw new-pw)) @@ -389,7 +401,7 @@ Please choose a password with at least 2 character classes.") (define (display-usage) (display "Usage: passwd-wrapper.scm\n") (display "Change NIS, Kerberos IV and Kerberos V passwords at once.\n") - (display "Written by David Frese.\n")) + (display "Written by Eric Knauel and David Frese.\n")) (define (main args) (set-interrupt-handler interrupt/int (lambda a (values))) @@ -397,7 +409,7 @@ Please choose a password with at least 2 character classes.") (set-interrupt-handler interrupt/quit (lambda a (values))) (if (null? (cdr args)) (case system-type - ((freebsd solaris) + ((freebsd solaris linux) (let ((old-pw (ask/check-old-password)) (new-pw (ask-new-password))) (if (not (ensure-kerbv-ticket old-pw))