[Wolfgang Schweer]
> Please check this script.

Seem to work fine on my test server, but I propose a slightly more
efficient grep line and a bit more robust handling of the first user.
Also propose to add more information in the comment to have an idea
four year from now that the script is obsolete. :)

#!/bin/bash                                                                     
 
#                                                                               
 
# /usr/share/debian-edu-config/tools/password-fix-squeeze-r0
#                                                                               
 
# Fix password expiring after 2 days (#664596) incorrectly introdiced
# in Debian Edu Squeeze up to r0; for new users the password will
# never expire. For existing users this will be the case after they've
# changed their password. Give old users the chance to change the
# password, exclude not affected accounts: templates and first user.
#
for i in $(getent passwd | grep home0 | egrep -v 
'newteacher|newstudent|:1000:1000:' | cut -d: -f1) ; do
    kadmin.local -q "modprinc -pwexpire 7000days $i"
done
kadmin.local -q "modpol -maxlife 0secs users"

I've commited it to svn.
-- 
Happy hacking
Petter Reinholdtsen


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to