diff options
author | Jeremy Allison <jra@samba.org> | 1998-11-05 02:47:50 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-11-05 02:47:50 +0000 |
commit | 00ec174d5962e8c1984513f8938f0974de9ba161 (patch) | |
tree | efae374f5c7325b083708115cd665887c8b2666c | |
parent | b9a7c991195cba6bb189210a8fe6b7fda7d30cec (diff) | |
download | samba-00ec174d5962e8c1984513f8938f0974de9ba161.tar.gz samba-00ec174d5962e8c1984513f8938f0974de9ba161.tar.bz2 samba-00ec174d5962e8c1984513f8938f0974de9ba161.zip |
Very simple awk script to convert a 1.9.18 password file into Samba 2.0
password file format.
Jeremy.
(This used to be commit 5a5dc248b5fc4f1b9234a15dbedd4e0c9068b15a)
-rwxr-xr-x | source3/script/convert_smbpasswd.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source3/script/convert_smbpasswd.sh b/source3/script/convert_smbpasswd.sh new file mode 100755 index 0000000000..edb775d3a6 --- /dev/null +++ b/source3/script/convert_smbpasswd.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Convert a Samba 1.9.18 smbpasswd file format into +# a Samba 2.0 smbpasswd file format. +# Read from stdin and write to stdout for simplicity. +# Set the last change time to 0x363F96AD to avoid problems +# with trying to work out how to get the seconds since 1970 +# in awk or the shell. JRA. +# +nawk 'BEGIN {FS=":"} +{ + if( $0 ~ "^#" ) { + print $0 + } else { + printf( "%s:%s:%s:%s:[U ]:LCT-363F96AD:\n", $1, $2, $3, $4); + } +}' |