Operating System - OpenVMS
1831806 Members
2488 Online
110029 Solutions
New Discussion

Seem to forgot how to add users.

 
Victor Mendham
Regular Advisor

Seem to forgot how to add users.

I am trying to create a logical for user directories, but am running into a problem on OpenVMS 7.3-1

I defined
define/system ADMIN$USERS disk0:[vmscommon.sysmgr.admin.users]

in uaf the device is set as ADMIN$USERS
in uaf the direc is set as [.vmendham]

when I login I get to admin$users and not the subdir [.vmendham]

If I set the directory in uaf as [.vmendham]and then do a show, I see admin$users:[sysexe.vmendham].

Any hints or tips?
28 REPLIES 28
Ian Miller.
Honored Contributor

Re: Seem to forgot how to add users.

parhaps
define/system/trans=conc ADMIN$USERS disk0:[vmscommon.sysmgr.admin.users.]
____________________
Purely Personal Opinion
Victor Mendham
Regular Advisor

Re: Seem to forgot how to add users.

I got it working, by adding sys0 to the logical.

Now I have to think how I am going to do this on my cluster.

Thanks...
Lokesh_2
Esteemed Contributor

Re: Seem to forgot how to add users.

Hi,

Can you post here you logical ?

Thanks & regards,
Lokesh
What would you do with your life if you knew you could not fail?
Victor Mendham
Regular Advisor

Re: Seem to forgot how to add users.

Lokesh,

MIKET>SHO LOG ADMIN$USER/FULL

"ADMIN$USER" [super] = "DISK0:[SYS0.SYSCOMMON.SYSMGR.ADMIN.USER.]" (LNM$SYSTEM_TABLE)
Ian Miller.
Honored Contributor

Re: Seem to forgot how to add users.

I see now - missing $

define/system ADMIN$USERS disk0:[vms$common.sysmgr.admin.users]

or
define/system ADMIN$USERS disk0:[sys0.syscommon.sysmgr.admin.users]
____________________
Purely Personal Opinion
Lokesh_2
Esteemed Contributor

Re: Seem to forgot how to add users.

Hi Victor,

"Now I have to think how I am going to do this on my cluster"

The logical you posted here or which the Ian has suggested will work clusterwide if you are using common sysuaf.


Sorry if I am not able to get your point,
Thanks & regards,
Lokesh
What would you do with your life if you knew you could not fail?
Uwe Zessin
Honored Contributor

Re: Seem to forgot how to add users.

There are common system disks that don't have a [SYS0].
.
Jan van den Ende
Honored Contributor

Re: Seem to forgot how to add users.

Victor,

what the others wrote WILL work, but should you not do some thinking before that??

In general, it really is NOT advisable to create user (or application-) directories _UNDER_ the system directories!

Leave [SYS0...], [SYSx...], [VMS$COMMON...]
for the operating system itself!

Creating a topdirectory [ADMIN_USERS] on any disk (preferably, but not necessarily another than the system disk) is the way to go.
And if you want to use that as a 'logical' device for your admin users (which you seem to want, and which _IS_ the wisest way to do it!), the you create a "concealed device":
$ DEFINE/SYSTEM/EXECUTIVE/TRANSLATION=CONCEALED-
ADMIN_USERS :[admin_users.]

Explanation:
/EXEC specifies an inner, more secure mode. If not, several privileged images will refuse to use it, leading to unexpected behavior.
/TRAN=CONC means you are going to use the directory as if it were an independent device. Making liberal use of the construct gives you MUCH more flexibility with future changes/expansions/replacements of your hardware.
Mind the "." after the dir-name, before the "]". It is vital for the functioning of the concealed device construct!
BTW., it is NOT possible to create a concealed device _WITHIN_ a concealed device.


Notice that I replaced your "$" with "_".
Though not strictly prescribed by VMS itself, Digital (Compaq & HP inherited it) has declared it 'good practise' to NEVER use "$"-signs in any private naming. THEY will use it in EVERY logical name, symbol name, & data structure name, so by adhering to the good practise, there will never be any clash with future extensions to VMS.
Nowadays there is a second important reason: any software ported from some *IX will give strange effects, if working at all, when confronted with $'s.


Hope this helps,

Jan

Don't rust yours pelled jacker to fine doll missed aches.
Uwe Zessin
Honored Contributor

Re: Seem to forgot how to add users.

I agree with Jan. Pick a top-level directory and you can later move the tree without problems to any disk you desire.

It's been some time now when I upgraded a single node to a cluster for a customer. Too bad that the software could not run on the other node, because some paths were hard-wired to [SYS0.SYSMGR.app...]
.
James C. Nix
Frequent Advisor

Re: Seem to forgot how to add users.



User directories as subdirectories of sys$manager?

My stomach gets queasy just thinking about it.

For expansion flexibility you might consider creating "group" device:directory logicals as well even it they point to the same drive/root.

If the accounting types complain that their critical end-of-month reports need more workspace, being used by operations etc, they will gladly find the money to get more drives for their a groups private use. Then it will be easy to shuffle the groups individually as needed.

Keeps the peace during the the end of month crunch.

I must hurry for there goes my group.... and I am their leader.
Willem Grooters
Honored Contributor

Re: Seem to forgot how to add users.

Basic line: KEEP YOU SYSTEM TIDY.

On all systems I worked on, the system disk is just what it is: the SYSTEM disk. The only non-system stuff on there is to be used system wide (programming languages, webserver and related software).

User environments and application reside on other disks.
The user environment is a concealed device, contains all home directories for users. Of course, this is defined /SYSTEM/EXEC.

For instance:
DEFINE/SYSTEM/EXEC/TRANS=concealed USER DKB0:[USER.]
In UAF, I can now define device = USER: and directory = [username], so the whole path is USER:[]. Of course, at login this directory must exist and this user needs to have at least RE access to it. For log files, he needs RWE - at least.

A similar construction for applications and data.
Each application has it's own root directory setup as a concealed device. Data is either kept within that root, or has a root (concelead device, of course) of its own.
These are /SYSTEM/EXEC as well.

And in startup, there is just one commandprocedure that sets all these logicals. Moving user environment, application or data just involves changing (and running) this procedure.

Willem
Willem Grooters
OpenVMS Developer & System Manager
Mobeen_1
Esteemed Contributor

Re: Seem to forgot how to add users.

Victor,
Irrespective of whether you have a common system disk across all nodes in your cluster or not. Like many of our colleagues have suggested, i would advise that you go in for a seperate user disk.

I have so far not seen or worked on a system that has user directories on system disk....you can say....may be i have been lucky :-)

rgds
Mobeen
Victor Mendham
Regular Advisor

Re: Seem to forgot how to add users.

I still seem to be having a problem here.

I can create the logical.
I can create the UAF device and dir.
Users can login to their home dirs.
Users can set def to sys$system or sys$manager.
But when they enter set def sys$login, they can not move back as it comes up invalid, if they login once again, they can not create any files as they get the following error.

Username: vmendham
Password:
Welcome to OpenVMS (TM) Alpha Operating System, Version V7.3-1 on node YSJAD1
Last interactive login on Monday, 21-JUN-2004 12:23:04.60

$ sho def
ADMIN_USER:[VMENDHAM]
%DCL-I-INVDEF, ADMIN_USER:[VMENDHAM] does not exist
$

$ create a.a
%CREATE-E-OPENOUT, error opening ADMIN_USER:[VMENDHAM]A.A; as output
-RMS-F-DEV, error in device name or inappropriate device type for operation
$

Any suggestions?
Ian Miller.
Honored Contributor

Re: Seem to forgot how to add users.

SYS$MANAGER is a search list.

How exactly are the users dir and device set in SYSUAF?
____________________
Purely Personal Opinion
Uwe Zessin
Honored Contributor

Re: Seem to forgot how to add users.

There is something wrong with the "ADMIN_USER" logical name. The error '-RMS-F-DEV,' hints at the device specification.
.
Hein van den Heuvel
Honored Contributor

Re: Seem to forgot how to add users.

Victor wrote..
> Any suggestions?

Yes: Read Jan's earlier reply.
Then re-read it and give it 10 points because it is a perfect answer. Take good note ot that trailing dot in the 'rooted directory spec'.


> I can create the logical.
Doublecheck.

>Users can login to their home dirs.
Those two concept are seperate on VMS.
Yes, you can login, but NO (you later prove that) they have no 'home dir'.
It is perfectly legal to login without valid sys$login default directory

>> $ sho def
ADMIN_USER:[VMENDHAM]
%DCL-I-INVDEF, ADMIN_USER:[VMENDHAM] does not exist

There was your warning! Read it carefully.


> $ create a.a
%CREATE-E-OPENOUT, error opening ADMIN_USER:[VMENDHAM]A.A; as output
-RMS-F-DEV, error in device name or inappropriate device type for operation

And the same problem, but makign it more clear that the problem is with the ADMIN_USER definition, not (yet) with the directory.

Fix that logical, and CREA/DIR ADMIN_USER:[VMENDHAM]/OWN=[VMENDHAM] (or something like that.

hth,
Hein.






Victor Mendham
Regular Advisor

Re: Seem to forgot how to add users.

Thanks for all the help.

I found if I remove the /EXEC from the logical it all works fine.

Many Thanks....
Jan van den Ende
Honored Contributor

Re: Seem to forgot how to add users.

Victor,

it _WORKS_ if you _REMOVE_ /EXEC?????
a. Check whether your DEFINEs really are COMPLETELY identical (except for the /EXEC) I find it hard to believe it WORKS without /exec, and then NOT if you add /exec.
b. If you defined it without /exec, try sending MAIL to the user, and reading it. (at least up intil V6.2) MAIL is one of the various utilities that require(d?) the device definitions to be exec mode, and about the easiest to test.

I will run some tests to verify your working/not working for a concealed device in user/exec mode, just to remove my 1% doubt (will be tomorrow though).


Jan
Don't rust yours pelled jacker to fine doll missed aches.
John Gillings
Honored Contributor

Re: Seem to forgot how to add users.

A trap for the unwary is that concealed logical names must be comprised of PHYSICAL device names. That means you cannot define a concealed device containing a logical name.

Here's a small command procedure to help define concealed logical names. It will resolve any logical names first (including nested concealed logical names)

For Victor's case it would be:

$ @DEFINE_CONCEALED ADMIN$USERS -
DISK0:[VMSCOMMON.SYSMGR.ADMIN.USERS] -
/SYSTEM/EXEC

I echo other's warnings about placing user directories anywhere within the system disk structure!

Beware of wrapping - lines have been shortened to accomodate ITRC, but there may
be errors introduced by formatting.

DEFINE_CONCEALED.COM
$ IF p1.EQS."" THEN -
INQUIRE p1 "Logical name"
$ IF p2.EQS."" THEN -
INQUIRE p2 "Directory"
$ ! p3 = extra DEFINE qualifiers
$ !
$ Conc=F$TRNLNM(F$PARSE(p2,,,"DEVICE")-":")
$ IF F$LOCATE("<",Conc).LT.F$LENGTH(Conc)
$ THEN
$ l="<"
$ r=">"
$ ELSE
$ l="["
$ r="]"
$ ENDIF
$ trans=(F$PARSE(p2,,,"DEVICE","NO_CONCEAL")+-
F$PARSE(p2,l+"000000"+r,,- "DIRECTORY","NO_CONCEAL"))--
(r+l)-("000000"+r)-("."+r)+-
"*"-".*"-"*"-r+("."+r)-(l+"."+r)
$ DEFINE 'p3' -
/TRANSLATION=(TERMINAL,CONCEALED) -
'p1' 'trans'
$ EXIT
A crucible of informative mistakes
Uwe Zessin
Honored Contributor

Re: Seem to forgot how to add users.

You should have done a '$ SHOW LOGICAL/FULL ADMIN_USER*" - it is possible that you already had a supervisor-mode logical name which would have overlayed the one in executive-mode most at the time.

.
Jan van den Ende
Honored Contributor

Re: Seem to forgot how to add users.

Yes, Uwe,
that was also the explenation I cooked up after leaving connectivity.
Victor,
if U/user mode and /exec mode BOTH exist, AND have a different meaning, then, in any normal execution the /user mode will be used, but, for some protected code, user mode is ignored, and exec (or maybe kernel) mode only is seen.
So, having a user mode logical which syntactically is incorrect, and a correct exec mode, most code will fail. Then you do the define again without /exec, this redefines the user mode logical to syntactically correct, and now it works.
Something like that must have happened, I guess.

Jan
Don't rust yours pelled jacker to fine doll missed aches.
Ian Miller.
Honored Contributor

Re: Seem to forgot how to add users.

John
"A trap for the unwary is that concealed logical names must be comprised of PHYSICAL device names"

I thought this was only true if the terminal attribute was present for the logical name.

Eg.
$ sh log foo /fu
"FOO" [super] = "SYS$SYSDEVICE:[SYS0.]" [concealed] (LNM$PROCESS_TABLE)

$ DIR FOO:[SYSMGR]

does work.

$ sh log foo /fu
"FOO" [super] = "SYS$SYSDEVICE:[SYS0.]" [concealed,terminal] (LNM$PROCESS_TABLE)

$ DIR FOO:[SYSMGR]

does not work.
____________________
Purely Personal Opinion
labadie_1
Honored Contributor

Re: Seem to forgot how to add users.

about concealed devices, if memory serves me, you can't use a concealed of concealed device, because it is not legal to have the string .][ more than once in a file/device definition.

This is why John says that the concealed must reference a physical disk, and not a concealed device.
Jan van den Ende
Honored Contributor

Re: Seem to forgot how to add users.

John,

until somewhere around V6 you are completely correct.
Since the, the need for concealed devices to be defined with translation_attribute /TERMINAL has been lifted. Of course, being VMS, it has not been removed since that could break existing code.
That is, it is now fully functional to define a concealed logical as
DISKA:[topdir.subdir.]
where DISKA is a (again concealed!!) logical name for DSA111, or DKB105.
Only limitation (which I would love to see lifted as well!!!) is that the device (DISKA in this example) must be a logical name that may NOT have a directory in its evaluation ( = recursive translation down to fysical name).

So, the need for you DEFINE_CONCEALED.COM has become much less.
It still has a function of course in defining concealed devices within rooted concealed devices (which is still lacking as a straightforward construct).


Janin
Don't rust yours pelled jacker to fine doll missed aches.