Page 1 of 1

special permissions for bash scripts

PostPosted: Sat Dec 06, 2003 9:16 am
by msi
hello,

i tried to hide my installed samba. so i hided the binaries:

/ {
...
/usr/sbin/nmbd h
/usr/sbin/smbd h
....
}

and in order to let /etc/init.d/samba start these processes:

/etc/init.d/samba {
/usr/sbin/nmbd rx
/usr/sbin/smbd rx
}

but it still can't see the two binaries. Why??
Maybe because it's bash script and only interpreted?
what can i do to solve this problem?

Markus

PostPosted: Mon Dec 08, 2003 11:46 am
by cmouse
Sorry but you can't give perms to a script. If you want to allow your samba to start at boot time, arrange so that the binaries boot up before you execute gradm -E. This way the binaries are hidden once the system is ready to rock.

PostPosted: Mon Dec 08, 2003 2:06 pm
by devastor
Well, i wouldn't say that.
You just need to make sure that the privileges you give to the script will
be inherited to /bin/bash and all other programs that are run by the script.

so something like

/etc/init.d/samba {
/usr/sbin/nmbd rx
/usr/sbin/smbd rx
/bin/bash rxi
/sbin/start-stop-daemon rxi
...
}

PostPosted: Tue Dec 09, 2003 1:12 pm
by msi
a thats the crux. thank you!