Many thanks for the excellent information. This group is a tremendous
resource.
rich frank
rnfrank_at_llnl.gov
George Gallen <ggallen_at_slackinc.com>
Bob Sloane sloane_at_UKANS.EDU
georg.buesse_at_db.com
Dave Courtade <drc_at_amherst.com>
Kevin Reardon <kreardon_at_na.astro.it>
Tom Webster <webster_at_ssdpdc.lgb.cal.boeing.com>
Stefan Heim <sheim_at_gwdg.de>
Biggerstaff, Craig T" <Craig.T.Biggerstaff_at_USAHQ.UnitedSpaceAlliance.com>
---------------------------------------------------------------------------------
Several suggestions promoted the sudo program, but I think I prefer
the direct approach.
Georg Buesse provided this C program which looks very servicable:
...we used this script to start predefined .sh scripts on an AIX workstation.
It should be possible to either write an .sh-script for mounting or to change
the system call to use the mount-instruction.
#include <stdio.h>
#include <strings.h>
#include <usersec.h>
main(argc, argv)
char *argv[];
int argc;
{
char sys_call[50];
const char user[] = "root";
if (argc != 1)
{
printf("Bitte Aufrufsyntax beachten! \n");
printf("z.B:> start_script \n");
}else {
sprintf(sys_call, "/home/xxxxx/start_script.sh %s \0 ", "");
printf ("%s \n" , sys_call);
/*printf ("%s \n", user);*/
setpcred(user,NULL);
system (sys_call);
}
}
--------------------------------------------------------------------------------
Kevin Reardon also furnished a C program complete with documentation. It is
fairly long so I won't post it here. I will be happy to foreward it to anyone
who is interested.
---------------------------------------------------------------------------------
David R. Courtade has a program specifically for a JAZ drive available at:
ftp.amherst.com/pub/jazstuf
---------------------------------------------------------------------------------
Craig Biggerstaff remembered a program that was posted by Emanuele Lombardi.
This should be in the archives.
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
original question:
Good morning,
I will be putting a Jaz drive on a 4.0D personal workstation. On VMS systems
I have a Fortran program which is installed with privilege. It calls .com file
which mounts a disk. I would think the same sort of thing could be done in UNIX
with a C program. I'd experiment with a Fortran program but alas, we have a C
compiler for DU but no Fortran.
Has anyone created a C program which can be set to "suid" to allow unprivilged
users to mount and umount a disk?
Thanks for the help.
rich frank
rnfrank_at_llnl.gov
Received on Mon Aug 17 1998 - 20:43:20 NZST