[Samba] smbpasswd script fails

Jack Mendez jmendez at vips4kids.org
Fri Dec 2 00:40:31 GMT 2005


i am using a script with awk which only works to add the first user from
my csv file.
when running with out the -s switch the output seems to be correct using
echo to test.

here is the script

#!/bin/bash
cat users.csv |awk 'BEGIN {FS=","}{print "echo smbpasswd -a -s
"$1"\n"$3"\n"$3"\n"}' |/bin/bash

this script successfuly adds the first user.
when using the -s switch.

when i tried this same script with out the -s switch the output is like this.
smbpasswd -a username
then bash complains
and smbpasswd wants a password
it does this for each user twice.
dunno
any ideas?




More information about the samba mailing list