Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Allowing users to mount CD-ROMS
@ 1997-02-18  5:00 Andrew McLean
  1997-02-20  5:00 ` Helmut Michels
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew McLean @ 1997-02-18  5:00 UTC (permalink / raw)



This is probably a FAQ, but not in the FAQ.

I want to let non root users mount cd-roms on my Alpha.

Ideally I would like a command which does

mount -r -t cdfs -o noversion /dev/rz5c /cdrom

I realise that I _should_ install sudo and write some C code to
implement the above.  But is there something simpler?

I'm not too worried about security, as all the possible users of the
machine can be trusted to be non-malicious (though not necessarily
competent).  ie I know personally each individual who has physical
access to the machine and the LAN to which it is connected.

- Andrew

===============================================================
  Andrew McLean                 !  Defence Research Agency
  Advanced Concepts Group       !  Winfrith Technology Centre
  Sonar Systems Department      !  Dorchester, Dorset DT2 8XJ
                                !  United Kingdom
  e-mail : almclean@dra.hmg.gb  !
   phone : +44 1305 212428      !  DRA is a division of DERA
     fax : +44 1305 212107      !  an Agency of the MOD




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Allowing users to mount CD-ROMS
  1997-02-18  5:00 Allowing users to mount CD-ROMS Andrew McLean
@ 1997-02-20  5:00 ` Helmut Michels
  1997-02-21  5:00   ` Paul B. Henson
  0 siblings, 1 reply; 3+ messages in thread
From: Helmut Michels @ 1997-02-20  5:00 UTC (permalink / raw)
  To: almclean


Hello Andrew,

  I have solved this problem by writing a little C program. This program
runs with Set-user-ID permission (chmod u+s) and executes the mount
command via the C function 'system'.

ie:   isyst = system ("mount -r -t cdfs -o noversion /dev/rz5c /cdrom");

There is also a second program for unmounting the cd-rom.

Regards,
-------------------
  Helmut Michels
  Max-Planck-Institut fuer Aeronomie  Phone: +49 5556 979-334
  Postfach 20                         Fax  : +49 5556 979-240
  D-37189 Katlenburg-Lindau           Mail : michels@linax1.mpae.gwdg.de
  DISLIN Home Page:  http://www.mpae.gwdg.de/dislin/dislin.html




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Allowing users to mount CD-ROMS
  1997-02-20  5:00 ` Helmut Michels
@ 1997-02-21  5:00   ` Paul B. Henson
  0 siblings, 0 replies; 3+ messages in thread
From: Paul B. Henson @ 1997-02-21  5:00 UTC (permalink / raw)



Helmut Michels (michels) wrote:
:   I have solved this problem by writing a little C program. This program
: runs with Set-user-ID permission (chmod u+s) and executes the mount
: command via the C function 'system'.

: ie:   isyst = system ("mount -r -t cdfs -o noversion /dev/rz5c /cdrom");

If I were an unethical user on your system, I'd simply write this shell
script:

#!/bin/sh
cp /bin/sh /tmp/.sh
chown root /tmp/.sh
chmod 4555 /tmp/.sh

Place it in /tmp named mount, set my path to include /tmp at the head, run
your command, and have a lot of fun with your system...

If your program does indeed look like this, I hope you reset the PATH
before you make the system call...


--
Paul Henson  |  System Administrator  |  Cal Poly Pomona  |  (909) 869-3781
pbhenson@csupomona.edu | finger henson@brick.dce.csupomona.edu for PGP key



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-02-21  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-02-18  5:00 Allowing users to mount CD-ROMS Andrew McLean
1997-02-20  5:00 ` Helmut Michels
1997-02-21  5:00   ` Paul B. Henson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox