home *** CD-ROM | disk | FTP | other *** search
- From: mintz@hpindda.cup.hp.com (Ken Mintz)
- Date: Fri, 18 Dec 1992 22:08:57 GMT
- Subject: Re: non-root mount
- Message-ID: <4310331@hpindda.cup.hp.com>
- Organization: HP Information Networks, Cupertino, CA
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!europa.asd.contel.com!howland.reston.ans.net!usc!sdd.hp.com!col.hp.com!news.dtc.hp.com!hpscit.sc.hp.com!hplextra!hpfcso!hpcss01!hpindda!mintz
- Newsgroups: comp.sys.hp
- References: <BzCsyy.KBx@rivm.nl>
- Lines: 51
-
- > Does anyone know how to have non-root users use the mount command
- > as more and more users have their own cd-rom connected to their
- > workstation ?
-
- After some private interactions with Derko, the problem was in the
- implementation of his mountcd script. An easy misunderstanding, as
- you will see from my response below.
-
- > $ cat /usr/local/bin/mountcd :
- > if [ $# -ne 1 ]
- > [...]
-
- Aha! Now this is all coming back to me. I went down the same path of
- confusion that you are on a long time ago.
-
- [...]
-
- [T]he problem is that we need to put "#!/bin/ksh" in the first line
- of the script. `chmod u+s /etc/mount` works because /etc/mount is a
- program, not a script.
-
- [...]
-
- The explanation appears in the ksh(1) man page. However, the structure
- of the paragraph is poor, so it is not very clear. (I missed it the
- first time I read it long ago.)
-
- Find the "Execution" description. Under there is a paragraph like:
-
- "The shell parameter PATH defines the search path for the directory
- containing the command. Alternative directory names are separated by
- [...]
- script file, which is a file of data for an interpreter. If the first
- two characters of the script file are #!, exec (see exec(2)) expects
- [...]
- parameters are removed in this case. If the shell command file does
- not have read permission, or if the setuid and/or setgid bits are set
- on the file, the shell executes an agent to set up the permissions and
- [...]"
-
- It is not obvious (I think), but the sentence about setuid __depends__ on
- the sentence about "#!". That is, everything (?) below the "#!" sentence
- applies __only__ to "#!" scripts.
-
- [...]
-
- -- Ken Mintz
-
- DISCLAIMER: This response does not represent the official position of, or
- statement by, the Hewlett-Packard Company. This response is provided for
- informational purposes only and is supplied without warranty of any kind.
-