1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-15 05:57:49 +03:00
Jeremy Allison 0890fe0b70 Realise this needs to be without the '.sh' ending as we will be
installing it in the BIN directory.
Jeremy.
(This used to be commit 75c79db9bec68b74d3b244f3d8184bd890ff33fa)
1998-11-05 02:50:17 +00:00

18 lines
446 B
Bash
Executable File

#!/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);
}
}'