home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1998 July & August
/
Pcwk78a98.iso
/
Wtestowe
/
Clico
/
UNIX
/
SAMBA
/
SOURCE
/
SAMBA.TAR
/
samba-1.9.17
/
source
/
updatesmbpasswd.sh
< prev
next >
Wrap
Linux/UNIX/POSIX Shell Script
|
1996-05-04
|
322b
|
15 lines
#!/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")
}
}'