|
|
 |  |
Re: Check Login ScriptFrom: Rolando Riley Date: Wednesday, October 2, 2002
Time: 8:01:11 am Hummm ... something like this maybe? . Use the user as parameter.
-------------------
#!/usr/bin/perl
open(DB,"/etc/passwd") || die "Couldn't open file!!!";
$flag = 1;
while ($VAR=<DB>){
$usuario = (split(/:/,$VAR))[0];
if ( $usuario eq $ARGV[0]) {
print "This user exists, pick another one ....";
$flag =0;
last;
}
}
if ($flag = 1) {
print "This user is available";
}
close(DB);
---------------
R. Riley
-----Mensaje original-----
De: isp-list@optigold.com [mailto:isp-list@optigold.com]En nombre de
Dawn D. Pfaltzgraff
Enviado el: Tuesday, October 01, 2002 12:11 PM
Para: isp-list@optigold.com
Asunto: [Optigold ISP] Check Login Script
Just was curious as to what sort of "script" anyone is running to check a
password file to make sure that the login is not already taken? Any
examples would be great. We use UNIX (FreeBSD and OpenBSD) with
authentication through the password file.
Thanks,
Dawn
Dawn D. Pfaltzgraff
System Administrator
Premier Systems -plains.net
ddpfz@plains.net
(970-848-0475)
---------------------------------------------------
To subscribe, unsubscribe or to search list archive
please visit http://www.optigold.com/lists/isp.html
---------------------------------------------------
---------------------------------------------------
To subscribe, unsubscribe or to search list archive
please visit http://www.optigold.com/lists/isp.html
---------------------------------------------------
|

Return to Digital Point Solutions' Home Page |