I have been attempting to implement an authentication scheme to run on both HPUX and Win_NT machines.
Until I was forced ( against my will ) to bring the NT systems into our engineering arena I was simply using this for authentication:
This was working great!!sub check_passwd { my ($uname,$guess) = @_; my ($name, $passwd, $uid) = getpwnam($uname); $supervisor = $uname; return (crypt($guess, $passwd) eq $passwd); } sub check_group { my ($uname,$group) = @_; while(($name, undef, undef, $members) = getgrent) { next if $name ne $group; return (grep { $_ eq $uname } split ( / /,$members )) ; } }
Now with NT I have been reading and searching and have found some info regarding using User::grent and User::pwentThe code I have so far to use these modules looks something like this...
I have a Tk popup to ask for name and passwd and everything I read says that I can do this on NT but I am getting an error message and have found no examples except for the pod's for these modules.sub check_passwd_nt { my ($uname,$guess) = @_; my $pw = getpw($uname); print Dumper($pw); } sub check_group_nt { my ($uname,$group) = @_; my $gr = getgr($uname); print Dumper($gr); } &check_passwd_nt($user_text,$passwd_text); &check_group_nt($user_text,"supercam");
The error is:
"Error: The getpwnam function is unimplemented at v:/NT/perl/lib/User/pwent.pm line 172."
Can anyone give me some examples of how they would authenticate a user on both NT and UNIX?
I have no qualms testing for OS and calling the appropriate function. So I guess I'm really simply needing a way to auth on NT.
Thanks in advance for all your help!!
Prost,
Moe
In reply to How do I authenticate users on multiple platforms? by el-moe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |