On Tue, 22 May 2001, K.Sen wrote:

> From: Naren Devaiah <[EMAIL PROTECTED]>
> Sent: Monday, May 21, 2001 12:42 AM
> 
> > You made the script g+s and made Tom the group owner... So when the script
> > runs, it will run under uid of Tom and gid of Tom. Does the problem become
> > obvious now?
> 
> No !!!??, the script has been given +s execution stamp, so the effective uid
> during execution is that of the super user...
No. that is not correct. Just setting the group +s does not make the
script run as root.

>From the Secure Programming for Linux and Unix HOWTO
<snip>
Many Unix-like systems, in particular Linux, simply ignore the setuid and
setgid bits on scripts to avoid the race condition
described earlier.....
</snip>

For a script to run as root, the file has to be owned by root and must be
setuid.

And as per above snippet that might not happen for scripts!

> 
> > I am not sure what you mean by not wanting to make mounting/umounting of
> > vfat partitions available all the time.
> 
> Mount on an as & when basis . Not available all the time...
> 
> (Binad suggested using sudo... !! Great but can it be done manually too
> ??)

Then you need something like automount... partitions are mounted
automatically on first access and umounted after some period of
inactivity.

Finally, when a user logs in, the telnet deamon drops privileges after
initialization and starts the shell with the uid of the user. The shell
then starts by executing profiles in /etc and $HOME.


-Naren


_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to