util:datablob: data_blob_pad checks its alignment assumption
[samba.git] / source3 / script / mknissmbpasswd.sh
blob2fea32c5e53ac453ac4f1069cc41aa48ed204759
1 #!/bin/sh
3 # Copyright (C) 1998 Benny Holmgren
5 # Script to import smbpasswd file into the smbpasswd NIS+ table. Reads
6 # from stdin the smbpasswd file.
8 while true; do
9 read row
10 if [ -z "$row" ]; then
11 break
14 if [ "$(echo $row | cut -c1)" = "#" ]; then
15 continue
18 nistbladm -a \
19 name=\"$(echo $row | cut -d: -f1)\" \
20 uid=\"$(echo $row | cut -d: -f2)\" \
21 lmpwd=\"$(echo $row | cut -d: -f3)\" \
22 ntpwd=\"$(echo $row | cut -d: -f4)\" \
23 acb=\"$(echo $row | cut -d: -f5)\" \
24 pwdlset_t=\"$(echo $row | cut -d: -f6)\" \
25 gcos=\"$(echo $row | cut -d: -f7)\" \
26 home=\"$(echo $row | cut -d: -f8)\" \
27 shell=\"$(echo $row | cut -d: -f9)\" smbpasswd.org_dir.$(nisdefaults -d)
28 done