From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079034715941.tru64-unix-managers.marc@archive.invalid> From: Pantelis Topalis Date: Thu, 28 Jan 1999 20:26:50 +0000 To: tru64-unix-managers Subject: SUMMARY: CDROM mounting X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079034715941 Many thanks to ----------------------------------------------------- Ronald D. Bowman alan@nabeth.cxo.dec.com Stanley Horwitz Bob Otterson K.McManus@greenwich.ac.uk pricha - Phil Richardson "Dr. Tom Blinn, 603-884-0646" Jean-Loup Risler kenny Maik Bachmann ------------------------------------------------------- My question was if there is a straightforward way for non priviledged users to mount CDROMs. As many pointed out the short answer is no but ... 1) A proposal was to change the priviledges of my CDROM device. It didn't work for me. 2) Some they suggested the use of sudo. I downloaded sudo_v1.5.7 and installed it. No luck. My box kept complaining about mount:Cannot load cdfs module mount() is looking the real and not the effective uid in DU 4.0D and may be this is the problem. 3) Another popular solution is to write a script which runs as su ... and open up a major security hole as Dr Kevin McManus noticed. 4) There is circulating a C program written by EMANUELE LOMBARDI lele@mantegna.casaccia.enea.it named monta.c I compiled it using cc (not gcc) and it works fine. The program follows : ---------------CUT HERE--------------------------------- /* monta.c Program to allow users to mount CDROM without the need to be root. Users can choose among a list of availabel devices (devs) the first of which is the default one See the section code referring the -h switch for the usage of monta. don't forget to chmod 4555 the executeble! by EMANUELE LOMBARDI lele@mantegna.casaccia.enea.it */ #include main(argc,argv,en) int argc; char *argv[]; char *en[]; { #define ARGS "o:ud:h" #define NDEVS 2 #define MAXNS 20 char *al[MAXNS] = NULL; char *devs[NDEVS],*dev; int umount,ns,i,c,okdev; extern int errno; setruid(0); devs[0]="/dev/rz8c"; /* default device*/ devs[1]="/dev/gd0c"; dev=devs[0]; al[0] = "/usr/sbin/mount"; al[1] = "-t"; al[2] = "cdfs"; al[3] = "-r" ; ns=4; umount=0; while (((c = getopt(argc, argv, ARGS)) != -1)) switch (c) { case 'd': okdev=0; for (i=0;i