source: branches/samba-3.3.x/source/script/updatesmbpasswd.sh@ 1003

Last change on this file since 1003 was 206, checked in by Herwig Bauernfeind, 16 years ago

Import Samba 3.3 branch at 3.0.0 level (psmedley's port)

File size: 322 bytes
Line 
1#!/bin/sh
2nawk 'BEGIN {FS=":"}
3{
4 if( $0 ~ "^#" ) {
5 print $0
6 } else if( (length($4) == 32) && (($4 ~ "^[0-9A-F]*$") || ($4 ~ "^[X]*$") || ( $4 ~ "^[*]*$"))) {
7 print $0
8 } else {
9 printf( "%s:%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:", $1, $2, $3);
10 for(i = 4; i <= NF; i++)
11 printf("%s:", $i)
12 printf("\n")
13 }
14}'
Note: See TracBrowser for help on using the repository browser.