All-in-one AWK program:
BEGIN {
while(getline < "webaccessuser" > 0) {
webaccess[$1] = 1;
}
if (ERRNO != "") {
print "Failed to read webaccessuser:", ERRNO;
exit 1;
}
FS=":";
}
{
if (webaccess[$1])
print $1 ":" $2;
}
run with /etc/shadow as input, will produce a NCSA style password file
with the users listed in webaccessuser.
-- Henrik Nordstrom Squid Hacker Amdavadi wrote: > > dear squid users, > > i am looing for a program or script which can > handle large changing password file for ncsa > authentication. > > i have a text file (webaccessuser) with user's login > name only. one name per line. it contains about 400 > names. one or two user names are inserted and deleted > from this file everyday. > > i have another text file (alluser-n-password) > generated with 'awk/sed' from /etc/shadow file. > this file contains information in > username:encryptedpassword > format. it is about 600 lines. one username and > encrypted password per line. it contains all > names that appear in 'webaccessuser' file plus > some other usernames. > > i am looking for a script or a program > which can generate a file from 'webaccessuser' > and 'alluser-n-password' that contains only > all usernames from webaccessuser and password > seperated by ':'. one user and password entry > per line for ncsa authentication. > > could anyone show me pointers to get/write a > script or program that would do the above > job once a day? > > thank you. > a. > > _____________________________________________________________________________ > http://messenger.yahoo.com.au - Yahoo! Messenger > - Voice chat, mail alerts, stock quotes and favourite news and lots more!Received on Fri Jun 29 2001 - 09:32:52 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:00:53 MST