- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Mounting optical platters
Operating System - HP-UX
1753877
Members
7596
Online
108809
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2002 07:19 AM
тАО03-28-2002 07:19 AM
Mounting optical platters
I have an optical jukebox on a machine running HP/UX 10.20.
Is there a way to let users other than root mount platters?
Is there a way to let users other than root mount platters?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2002 07:26 AM
тАО03-28-2002 07:26 AM
Re: Mounting optical platters
Hi
try www.software.hp.com
download sudo
allow mounts via that
Steve Steel
try www.software.hp.com
download sudo
allow mounts via that
Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2002 07:26 AM
тАО03-28-2002 07:26 AM
Re: Mounting optical platters
Not if they are mounted to a filesystem, because only root can do such. You could provide sudo or a setuid script (as root) to do such.
live free or die
harry
live free or die
harry
Live Free or Die
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2002 12:00 PM
тАО03-28-2002 12:00 PM
Re: Mounting optical platters
Hi,
Two programs you may use, one for mounting,
one for unmounting. This for mount/unmount
of CD, so you may have to do some changes.
Device-file and mount-point are hardcoded,
but you may rewrite the program to have
them take this as arguments.
You will however have to consider the
securityrisk involved. After all there is
a reason why you normally have to be root
to mount/unmount
/* Program that gives a regular user the ability to mount a cd.
. Compile the program
. Make root the owner of the executable.
. chmod 4755 executable
Olav Baadsvik Oslo Norway.
*/
#include
#include
#include
#include
main ()
{
int ios;
struct cdfs_args cda;
char buf[128];
setuid(geteuid());
setgid(getegid());
cda.fspec="/dev/dsk/cdrom";
ios=sysfs(GETFSIND, MNTTYPE_CDFS);
/* printf ("sysfs for %s er 0x%x\n", cda.fspec, ios); */
sysfs(GETFSTYP, ios, buf);
/* printf ("sysfs fstyp er >%s<\n", buf); */
ios = mount ( cda.fspec, "/CDROM",
( MS_DATA|MS_RDONLY),
MNTTYPE_CDFS,&cda, sizeof(cda) );
/* printf ("ios=%d\n", ios); */
if (ios) perror ("cdmount");
}
#include
#include
#include
main ()
{
setuid(geteuid());
setgid(getegid());
umount("/CDROM");
}
Two programs you may use, one for mounting,
one for unmounting. This for mount/unmount
of CD, so you may have to do some changes.
Device-file and mount-point are hardcoded,
but you may rewrite the program to have
them take this as arguments.
You will however have to consider the
securityrisk involved. After all there is
a reason why you normally have to be root
to mount/unmount
/* Program that gives a regular user the ability to mount a cd.
. Compile the program
. Make root the owner of the executable.
. chmod 4755 executable
Olav Baadsvik Oslo Norway.
*/
#include
#include
#include
#include
main ()
{
int ios;
struct cdfs_args cda;
char buf[128];
setuid(geteuid());
setgid(getegid());
cda.fspec="/dev/dsk/cdrom";
ios=sysfs(GETFSIND, MNTTYPE_CDFS);
/* printf ("sysfs for %s er 0x%x\n", cda.fspec, ios); */
sysfs(GETFSTYP, ios, buf);
/* printf ("sysfs fstyp er >%s<\n", buf); */
ios = mount ( cda.fspec, "/CDROM",
( MS_DATA|MS_RDONLY),
MNTTYPE_CDFS,&cda, sizeof(cda) );
/* printf ("ios=%d\n", ios); */
if (ios) perror ("cdmount");
}
#include
#include
#include
main ()
{
setuid(geteuid());
setgid(getegid());
umount("/CDROM");
}
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP