From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,ab7d8fac65113d53 X-Google-Attributes: gidfee84,public From: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) Subject: Re: HELP: How to get hard disk information on OSF1 Date: 1996/02/01 Message-ID: <4ep1o6$7km@nntpd2.cxo.dec.com>#1/1 X-Deja-AN: 137522732 distribution: world references: <4em1th$eo8@jethro.Corp.Sun.COM> organization: Digital Equipment Corporation keywords: Hard Disk reply-to: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) newsgroups: comp.unix.osf.osf1 In article <4em1th$eo8@jethro.Corp.Sun.COM>, evelyn@rubyl.corp.sun.com (Evelyn Zhan) writes: >I am trying to collect hard disk informations, such as disk label, disk >capacity, SCSI id, etc, on OSF1 and ULTRIX. But I don't know how. I don't >have the root access, and I need the info as an output of a command in ascci >format. The SCSI ID is encoded in the minor device number. The details are in the SCSI manual page. The partition table, label, geometry and general device information all require read access to the device. The ways of getting the information all require read access to devices that are typically read protected... Partition table: ULTRIX - chpt(8), requires read access to device Digital UNIX - disklabel(8), requires read access to device Capacity and Geometry ULTRIX - DEVGETGEOM I/O control, requires read access device Digital UNIX - DEVGETGEOM I/O control, ditto Both - scu(8), requires read access to /dev/cam. General information: Both - DEVIOCGET I/O control, requires read access to device. It seems pretty clear that you can't get there from here without a program running as root or changing the permissions of devices so that you can read them. The middle ground is write a program that does these operations and can run setuid root to give read access so these I/O controls will work. > >Thanks very in advance. > -- Alan Rollow alan@nabeth.cxo.dec.com