fixed error check which caused domain logons to fail
[Samba.git] / source / script / convert_smbpasswd
blobedb775d3a678b8b41b22ec972737fbb8a13e4f12
1 #!/bin/sh
3 # Convert a Samba 1.9.18 smbpasswd file format into
4 # a Samba 2.0 smbpasswd file format.
5 # Read from stdin and write to stdout for simplicity.
6 # Set the last change time to 0x363F96AD to avoid problems
7 # with trying to work out how to get the seconds since 1970
8 # in awk or the shell. JRA.
10 nawk 'BEGIN {FS=":"}
12 if( $0 ~ "^#" ) {
13 print $0
14 } else {
15 printf( "%s:%s:%s:%s:[U ]:LCT-363F96AD:\n", $1, $2, $3, $4);