Article View: vmsnet.internals
Article #294Re: Finding a users disk name
From: Ed Wilts
Date: Wed, 07 Oct 1992 15:47
Date: Wed, 07 Oct 1992 15:47
37 lines
1955 bytes
1955 bytes
In article <1992Oct7.031040.5662@gw.wmich.edu>, 737ochs@gw.wmich.edu writes: > Hello, I'm helping a friend of mine write a program that kinda simulates > a unix-type operating system. What we are having trouble with is the > cd ~user command. We don't know how to get the person's disk area name > from their username. We'd like to be able to do cd ~user and have the > program give us back disk$xxx:[user]. Is there an easy way to do this, > and a way to do it without having operator privileges. Oh, we are using > VMS version 5.5 The only place the user's default device and directory is stored is in SYSUAF.DAT. Any method you choose for determining the device must have read access to this file. This doesn't require "operator privileges" - READALL, SYSPRV, or BYPASS will suffice, or you can install the image you use to get the default with privilege so that the end user doesn't need them. What you can do is pick up the GETUAI utility off of an FTP site (see Ric Steinberger's monthly posting for locations). Then you can do stuff as simple as: $ INSTALL GETUAI/PRIV=READALL ! do at system boot time $ GETUAI/DEFAULT=joesdir JOE $ SET DEFAULT 'joesdir' It's interesting to note that the following does *not* work (unfortunately): $ POSIX psx> pwd /disk1/fred psx> cd ~joe psx> pwd /disk1/joe psx> ^d $ SHOW DEFAULT DISK1:[FRED] -- Ed Wilts, BC Systems Corp., 4000 Seymour Place, Victoria, B.C., Canada, V8X 4S8 EWilts@Galaxy.Gov.BC.CA | Ed.Wilts@BCSystems.Gov.BC.CA | (604) 389-3430
Technical Details
Message-ID:
<1992Oct7.084705.1063@galaxy.gov.bc.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!gumby!destroyer!cs.ubc.ca!bcsystems!ewiltsReferences:
<1992Oct7.031040.5662@gw.wmich.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!gumby!destroyer!cs.ubc.ca!bcsystems!ewilts From: ewilts@galaxy.gov.bc.ca (Ed Wilts) Newsgroups: vmsnet.internals Subject: Re: Finding a users disk name Message-ID: <1992Oct7.084705.1063@galaxy.gov.bc.ca> Date: 7 Oct 92 08:47:04 -0700 References: <1992Oct7.031040.5662@gw.wmich.edu> Reply-To: EWILTS@GALAXY.GOV.BC.CA Organization: BC Systems Corporation Lines: 37