Re: Shell Script and SUID? (Now authentication problem)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Loeung Vidol wrote:
I've tried sudo and it worked. I can now do the thing I need with it. Thanks
again Keith for all your helpful suggestions.

Well, one more thing is that, I would like to verify if a password provided
by the user is correct. Is there a shell command for this? I'm not
attempting write my own authentication module (with PAM or whatsoever); I'd
like know if it can be done with a certain shell command, which would just
say if a given password is correct for a given user.

If it's not possible with a shell command, may I further ask if it can be
done in a programming language like C, Perl, PHP,...?

I am not sure what you are trying to do with verifying a password. If you mean against the shadow password file, then su does that, but it also changes your effective UID/GID. There are PAM APIs for checking for a valid password in many languages, but I haven't needed to code one so I can't post an example.


Best Regards,
Keith
--
LPIC-2, MCSE, N+
Droplets of yes and no in an ocean of maybe
Got spam? Get spastic http://spastic.sourceforge.net



--
Psyche-list mailing list
Psyche-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux