linuxmuster/linuxmuster-linbo — pull request #18 by Yannik (2013-06-09 21:42:53+00:00)
Title: fix for trac-ticket #146, update-linbofs generated a false password hash

The linbo password hash is generated using
linbo_passwd=`grep ^linbo /etc/rsyncd.secrets | awk -F\: '{ print $2 }'`
linbo_md5passwd=`echo -n $linbo_passwd | md5sum | awk '{ print $1 }'`
The generated hash is false, as you can easily test using echo -n "password" | md5sum.
Reason for this is that awk always appends a newline to it's output, which then corrupts the password.
You can easily fix the problem like this:
linbo_passwd=`grep ^linbo /etc/rsyncd.secrets | cut -d ":" -f2 | tr -d '\n' | md5sum`
I also switched to the less expensive (+ this also is the tool dedicated for this operation) cut instead of awk.