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

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

 



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,...?


Best regards,
Vidol


----- Original Message -----
From: Keith Winston <kwinston@xxxxxxxxxxx>
To: <psyche-list@xxxxxxxxxx>
Sent: Saturday, April 19, 2003 6:48 PM
Subject: Re: Shell Script and SUID?


> Loeung Vidol wrote:
> > Well, thank you, Tom and Keith.
> > I've checked the man page of 'passwd' and it actually has the option
> > '--stdin', which tells the command to accept the new password from
standard
> > input just once; making it easy to automate things.
>
> Oops, my bad.  The second line of your script said passwd and I saw
> useradd again.  If you don't allow user interactive logins, you could
> use a SUID root script or just run it as root.  But if you are trying to
> delegate some root functions to other interactive users, sudo is usually
> better.
>
> Expanding on your first idea...you can set up a script that emulates the
> wheel group in FreeBSD by using the wheel group in Red Hat.  For
> example, create your script in /usr/bin and set the ownership to
> root:wheel, permissions to rwsr-x---.  Then, add the users allowed to
> run it to the wheel group and they will be able to run the script as
> root, while normal users can't run it at all.
>
> 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





-- 
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