r3592: auto-cleanup the test.$$ log files in these test scripts on control-C
[samba.git] / source4 / script / convert_smbpasswd
1 #!/bin/sh
2 #
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.
9 #
10 nawk 'BEGIN {FS=":"} 
11 {
12         if( $0 ~ "^#" ) {
13                 print $0
14         } else {
15                 printf( "%s:%s:%s:%s:[U          ]:LCT-363F96AD:\n", $1, $2, $3, $4);
16         }
17 }'