diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-05-06 15:02:58 +0000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2004-05-06 15:02:58 +0000 |
commit | e256acce3bfc22534b5738f8438faf328fda6a8b (patch) | |
tree | db96031437314f4d14db5a4f4e837c9f8c28642b /source/script/convert_smbpasswd | |
parent | 9c9d2fac0b8ccbb5292a7e8b90361da6ea9d2ece (diff) | |
download | samba-e256acce3bfc22534b5738f8438faf328fda6a8b.tar.gz samba-e256acce3bfc22534b5738f8438faf328fda6a8b.tar.xz samba-e256acce3bfc22534b5738f8438faf328fda6a8b.zip |
r518: merge in the SAMBA_2_2 branch from cvs to brnaches/SAMBA_2_2
this is maybe not complete yet, please wait until I create the DAY_ZERRO tag
metze
Diffstat (limited to 'source/script/convert_smbpasswd')
-rwxr-xr-x | source/script/convert_smbpasswd | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/script/convert_smbpasswd b/source/script/convert_smbpasswd new file mode 100755 index 00000000000..edb775d3a67 --- /dev/null +++ b/source/script/convert_smbpasswd @@ -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); + } +}' |