On Thu, 17 Feb 2005, Henry Ortega wrote:
> Is there a way to pass the password as a parameter
> to /bin/login?
>
> Or is there any other command I can use to verify
> if a certain username/password pair is valid?
In perl:
#!/usr/bin/perl
use strict;
my $pwd = (getpwuid(getpwnam($ARGV[0])))[1];
if (crypt($ARGV[1], $pwd) ne $pwd) {
print "User/password invalid\n";
} else {
print "User/password ok\n";
}
arguments (username passwd) supplied on the command line. change this
depending on your source.
rowel
--
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie