1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
samba-mirror/source3/script/updatesmbpasswd.sh
Samba Release Account 0e8fd33987 Initial version imported to CVS
(This used to be commit 291551d807)
1996-05-04 07:50:46 +00:00

15 lines
322 B
Bash
Executable File

#!/bin/sh
nawk 'BEGIN {FS=":"}
{
if( $0 ~ "^#" ) {
print $0
} else if( (length($4) == 32) && (($4 ~ "^[0-9A-F]*$") || ($4 ~ "^[X]*$") || ( $4 ~ "^[*]*$"))) {
print $0
} else {
printf( "%s:%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:", $1, $2, $3);
for(i = 4; i <= NF; i++)
printf("%s:", $i)
printf("\n")
}
}'