Bug 6641 - Password with Double Quote (") do not pass into passwd chat
Password with Double Quote (") do not pass into passwd chat
Status: NEW
Product: Samba 3.3
Classification: Unclassified
Component: User & Group Accounts
3.3.7
x64 Linux
: P3 major
: ---
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-16 23:04 UTC by Sky Lau
Modified: 2009-08-16 23:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sky Lau 2009-08-16 23:04:03 UTC
I have set the following in [global], for changing kerberos password

passwd program = /usr/local/sbin/change-kerberos-password.sh %u
passwd chat = "*Password:*" %n\n *Done*

change-kerberos-password.sh

#!/bin/bash
THEUSER=$1
echo -n "Password: "
stty -echo
read THEPASS
stty echo
echo
TEST_USER_EXISTS=`/usr/kerberos/sbin/kadmin.local -q "getprinc $THEUSER" 2> /dev/null | grep ^Principal | wc -l`
if [ $TEST_USER_EXISTS -eq 1 ] ; then
  /usr/kerberos/sbin/kadmin.local -q "cpw -pw \"$THEPASS1\" $THEUSER" > /dev/null 2>&1
fi
echo Done
exit 0

The Problem: THEPASS will never get a " when I change the password 
either I attempt change the password in Windows Ctrl+Alt+Del or using smbpasswd -r

Outcome: The Samba will have updated with password but the Kerberos will have the password with " omitted