[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

1423.0. "Adding accounts from DCL" by WHOS01::SOUSA () Tue Sep 15 1992 20:35

    
    I have a need to add ALL-IN-1 (and their associated UAF) accounts from
    outside of ALL-IN-1 (ie. from DCL).  I tried submitting the 
    OA$LIB:MUA_CREATE.COM procedure with the appropriate parameters, but it
    failed with
    
    	Failed to locate the specified template
    
    Yet, the template is not passed as a parameter.  Has anyone else ever 
    attempted to do this?  Or is there a better way for me to do this??
    (Besides getting into ALL-IN-1 and doing it the right way!!!)
    
    Any help is greatly appreciated.
    
    Tony
T.RTitleUserPersonal
Name
DateLines
1423.1Trace and show stopped queueUTRTSC::SCHOLLAERTAlfa readyWed Sep 16 1992 08:1516
    Tony,
    
    Whats the reason for this ?
    
    You could Create an account with ALL-IN-1 with trace on
    so you can see how ALL-IN-1 submits the job. 
    
    When you stop the VMS queue before doing this you
    can $show entry /full to see the correct parameters.
    
    I think ALL-IN-1 puts a MUAmumble.DAT in [.mgr] with
    the scrambled VMS password. Trace will show you this.
    
    Good luck,
    
    Jan
1423.2See other noteIOSG::TALLETTArranging bits for a living...Wed Sep 16 1992 08:599
    
    	We talked someone through this in note 2742 in the old conference
    	OAWEGO::ALL-IN-1_V24 (KP7 etc).
    
    	The template name is in the profile record so you need to fill
    	it out.
    
    Regards,
    Paul
1423.3Still having a probWHOS01::SOUSAWed Sep 16 1992 17:5578
Thanx for the pointers to the other note.  It helped, but I am basically at 
the point where you guys stopped at that note, I'm not getting the template
information copied into my PROFIL.  I copied the following code out of the 
OA$LIB:SM_CR_USER_DETAILS.SCP file, with the results I am getting after it.

.label get_user_details
.TEXT ""
.TEXT "Extracting the new user details from the template ..."
	get #profil_template = profil.template[cli$new_user]
	get #template = smtemplate.template[#profil_template]

	.if #template eqs "" then .goto no_template 

	get cli$template = #template
	get cli$vms_user = profil.vmsusr[cli$new_user]
	get cli$owner_name = profil.fulnam:31[cli$new_user]
.TEXT "The template used is " cli$template
.TEXT "The VMS username is " cli$vms_user
.TEXT "The ALL-IN-1 full name is " cli$owner_name
.TEXT ""


This results in :
	
	The template used is EIS
	The VMS username is 
	The ALL-IN-1 full name is 

So for some reason, it's not picking up the username and full name.  The next 
few lines include the code that is being executed, (which I copied from one
of the notes in the other conference):


$ creator	= f$edit(f$getjpi(0,"username"),"collapse")
$ Given_Name	= "Tony"
$ Surname	= "Test"
$ username	= f$extract(0,15,surname) + f$extract(0,1,given_name)
$ username	= f$edit(username,"upcase")
$ initials	= f$extract(0,1,given_name) + f$extract(0,1,surname)
$ owner		= given_name + " " + surname
$
$ file = f$pid(0)+".tmp"
$ open/write out 'file'
$ write out ""
$ write out "$ allin1/reenter/noinit"
$ write out "Write add Profil user = ""''username'"" " -
			+ ",template = """EIS""""
$ write out "Write add Profil user = ""''username'"" " -
			+ ",vmsusr = ""''username'"""
$ write out "Write add Profil user = ""''username'"" " -
			+ ",direct = ""user$disk:[''username'.A1]"""
$ write out "Write add Profil user = ""''username'"" " -
			+ ",surname1 = ""''surname' """
$ write out "Write add Profil user = ""''username'"" " -
			+ ",forename1 = ""''given_name'"""
$ write out "Write add Profil user = ""''username'"" " -
			+ ",fulnam = ""''owner' """
$ write out "Write add Profil user = ""''username'"" " -
			+ ",initials1 = ""''initials'"""
$ close out
$ @'file'/out='f$pid(0)'.log
$
$ Submit oa$lib:mua_create -
	/username=ALLIN1 -
	/noprint /keep -
	/log = OA$LOG:OA$CREATE_'username'.log -
	/name="OA$CREATE_''username'" -
	/param =( -
		"MANAGER"  -		! username to create
		,"TESTT"-		! username to notify
		,"0" -			! re-use existing VMS account
		,"23423423" -			! Job Id ?
		,"0" -			! Password (unused)
		,"USER$DISK:[TESTT]" -	! UAF directory ?
		,"1" -			! Form ?
		)
$ exit $status
1423.5make_user_batch.comIOSG::TALLETTArranging bits for a living...Thu Sep 17 1992 11:1928
$!----------------------------------------------------------------------------
$! ************************** Start of MUA_CREATE ****************************
$!----------------------------------------------------------------------------
$	@oa$lib:mua_create  -
	    "''p1'" "''p2'" "''p3'" "''p4'" "''p5'" "''p6'" "''p7'" "''p8'"
$!----------------------------------------------------------------------------
$! ************************** End of MUA_CREATE ******************************
$!----------------------------------------------------------------------------
$	if mas_create_status then goto it_worked
$	if f$extract(2,2,mas_create_message).nes."$_" then -
			mas_create_message = "SM$_" + mas_create_message
$ file = "err"+f$pid(0)+".tmp"
$ open/write out 'file'
$ write out ""
$ write out "$ allin1/reenter/noinit"
$ write out "get cli$msg = ''mas_create_message'"
$ write out "exit"
$ write out "$mess==msg"
$ close out
$ mess == ""
$ @'file'/out=err'f$pid(0)'.log
$ if mess.eqs."" then mess=="Failed for an unknown reason"
$ write sys$output "Failed to create user ''p2'"
$ write sys$output mess
$ exit 0
$ it_worked:
$ exit
    
1423.6make_user.comIOSG::TALLETTArranging bits for a living...Thu Sep 17 1992 11:2053
$ Given_Name    = "Paul"
$ Surname       = "Tallett"
$ template	= "UNPRIVVED"
$ diskname	= "USER1:"
$ vms_passwd	= "XXXXXXXXXXXXXXX"
$ use_existing_vms = 0
$!
$ creator       = f$edit(f$getjpi(0,"username"),"collapse")
$ username      = f$extract(0,15,surname) + f$extract(0,1,given_name)
$ username      = f$edit(username,"upcase")
$ initials      = f$extract(0,1,given_name) + f$extract(0,1,surname)
$ owner         = given_name + " " + surname
$
$ file = f$pid(0)+".tmp"
$ open/write out 'file'
$ write out ""
$ write out "$ allin1/reenter/noinit"
$ write out "Write add Profil user = ""''username'"" " -
		+ ",template = ""''template'"" " -
		+ ",vmsusr = ""''username'"" " -
		+ ",direct = ""''diskname'[''username'.A1]"" " -
		+ ",delete_from = ""''diskname'[''username']"" " -
		+ ",surname1 = ""''surname' "" " -
		+ ",forename1 = ""''given_name'"" " -
		+ ",fulnam = ""''owner' "" " -
		+ ",initials1 = ""''initials'"""
$ write out "get cli$sts = oa$status"
$ write out "get cli$sts"
$ write out "exit"
$ write out "$stats==sts"
$ close out
$ stats == 0
$ @'file'/out='f$pid(0)'.log
$ if stats.ne.1 then goto bad_profile
$ Submit make_user_batch -
        /username=ALLIN1 -
        /noprint /keep /notify -
        /log = OA$LOG:OA$CREATE_'username'.log -
        /name="OA$CREATE_''username'" -
        /param =( -
                "''creator'"  -			! username to notify
                ,"''username'"-			! username to create
                ,"''use_existing_vms'" -	! re-use existing VMS account
                ,"0" -				! Pretend called from MAS
                ,"''vms_passwd'" -		! Password
                ,"''diskname'[''username']" -	! UAF directory
                ,"1" -				! Pretend manager call
                )
$ exit $status
$ bad_profile:
$ write sys$output "Failed to add profile record"
$ exit
    
1423.4Working exampleIOSG::TALLETTArranging bits for a living...Thu Sep 17 1992 11:2118
    Hi there!
    
    	There was a lot wrong with your command file, for one thing, five
    	WRITE ADD's in a row of the same record doesn't go down too well!!
    
    	As this is a popular request, I corrected your command file and
    	added some more error checking and tested it. It works okay for
    	me on V3.0 (well nearly V3.0, V3.0 plus a bit actually!). I don't
    	submit MUA_CREATE directly, I submit an intermediate command file
    	so I can get the error status back.
    
    	** IF YOU ARE ON V2.4 YOU SHOULD DELETE THE LINE CONTAINING
    	"DELETE_FROM" AS THIS DIDN'T EXIST IN V2.4 **
    
    	You call it by running MAKE_USER.COM
    
    Regards,
    Paul
1423.7Thanx, but first...WHOS01::SOUSAFri Sep 18 1992 15:549
    Paul,
    
    Thanx for your procedure, it works great, almost.  The only thing it
    doesn't seem to be doing is populating the fields that were entered in
    the template such as Organization, Department, etc...!  Any clues why.
    
    Thanx again for all your help so far!!!
    
    Tony
1423.8SMOPIOSG::TALLETTArranging bits for a living...Mon Sep 21 1992 11:1410
    Hi there!
    
    	Yes, that's right. The fields you mention are not populated
    	by the create user script, instead they are done by the UI
    	when you create a user so that you can change them. If you
    	want them populating, do so in MAKE_USER.COM before you do the
    	submit. If you fix it, please repost the updated .COM files.
    
    Regards,
    Paul
1423.9Command file fails on multi-language systemNWGEDU::MACKNEYThu Jan 21 1993 17:3238
    Paul,
    
    I copied your command file to my system and tried it. However it fails
    with an error "BCH_NO_LANGUAGE". I ran under DCL from the ALLIN1 account.
    
    The OA$LOG file is the following:
    
    //setting CREATE$FAIL and checking details of administrator and manager... 
    //cli$admin_accnt =
    //cli$admin_dir =
    //
    //a fatal error has occured in SM_CR_USER_DETAILS.SCP
    //
    //!$
    //$		if return_status then goto check_results
    //$!
    //$ 	if .not. return_status then goto no_language
    //$ no_language:
    //$		failure_reason = "BCH_NO_LANGUAGE"
    //  .......
    
    I see the script SM_CR_USER_DETAILS is located in the language
    dependent directories. 
    
    When I create an account from ALL-IN-1 MUA I get:
    
    //setting CREATE$FAIL and checking details of administrator and manager... 
    //cli$admin_accnt = ALLIN1
    //cli$admin_dir = DISK$APPS1:[ALLIN1.MGR]
    //
    //Is it the manager calling? (0=No,1=Yes); value = 1
    // ....
    
    Any ideas why the difference?
    
    John Mackney
    
    
1423.10check the symbol valuesIOSG::TYLDESLEYFri Jan 22 1993 12:2841
Hi John,

The lines in sm_cr_user_details that are giving you a problem are either:

  get cli$admin_language = profil.language:U[cli$admin_id]

or:
  get cli$manager_language = profil.language:U["MANAGER"]

Both follow the same error path out through 'no_language'.

The first thing that you could do is try these commands interactively
from the ALLIN1 account e.g.:

  <get #x = = profil.language:U["MANAGER"]\get #x

...and see what you get.

 I've run the code happily here on a single language system, but it is 
certainly possible that on your system, either cli$admin_id, or one of 
the two values a) profil.language:U["MANAGER"] and 
b) profil.language:U[cli$admin_id], might not be defined.

The next thing to note, is that these checks are really only there to 
make sure that an account is available to receive exception reports.
If you want to move on quickly, then you could just comment out the code 
lines in sm_cr_user_details from:
  ! Get the default operating languages for admin and manager
to:
  ! Get the parsed user name for creating the calendar / pst files
    
(be careful to change it back again for 'normal' account creation!!!)

This may mean that you simply come up against another undefined value, 
and it may be better to solve the underlying problem, but you never know
- it might work!
    
Also, it may help to set trace around this bit of the code in 
    sm_cr_user_details, to see what is happening. Let us know how you go.
Cheers
DaveT
1423.12admin_id = P1 throughoutIOSG::TYLDESLEYFri Jan 22 1993 16:2719
    John,

    It seems that cli$admin_id is not defined when sm_cr_user_details
    is run. The 'cli$' bit simply makes a valid symbol in the main
    process available to the ALL-IN-1 script. In this case, admin_id
    comes from 'creator' in make_user.com, via P1 to make_user_batch.com,
    where it is again used as P1 to mua_create.com. I think that you will
    need to track its validity all the way down the line.

    Also, when you do the interactive check, make sure that there is
    something in the symbol that you use for cli$admin_id. Try it with
    'ALLIN1' as this is the account in question:

    <get #x = profil.language:U["ALLIN1"]\get #x

    (apologies - double equals in my last reply was erroneous cut & paste!)

    Hope this helps,
    DaveT
1423.13another thought..IOSG::TYLDESLEYFri Jan 22 1993 16:306
    ...and also try with MACKNEY in there if that is the account you
    are working from:
    
    <get #x = profil.language:U["MACKNEY"]\get #x
    
    dt
1423.14Error in MAKE_USER.COMNWGEDU::MACKNEYFri Jan 22 1993 17:1116
    Thanks for the help. For your information (and anyone else who finds
    the same problem) the command file MAKE_USER.COM assumes the admin_id
    is ALLIN1. On a default system the admin_id is "MANAGER".
    
    This is being done through the line:
    
    $creator 	= f$edit(f$getjpi(0,"username"),"collapse")
    
    which is then submitted as P1 to the script SM_CR_USER_DETAILS.
    
    As the command file is submitted under the account ALLIN1, the above
    symbol translates to the name ALLIN1, not MANAGER.
    
    Regards
    John Mackney.
    
1423.15MAKE_USER.COM createds LOCKED profilesNWGEDU::MACKNEYWed Jan 27 1993 18:0010
    Back again!
    
    The accounts I am creating with this command file are all locked.
    
    I can unlock them with the UNLOCK command from MUA ... but I would
    rather they were not locked to start with. 
    
    Does anyone no why this is happening and how it can be prevented.
    
    John.
1423.16Seek, and ye shall findIOSG::TALLETTGimmee an Alpha colour notebook...Thu Jan 28 1993 08:2512
    
    	Try looking at what MUA UNLOCK does:
    
    WRITE CHANGE PROFIL USER=$SM_ACCOUNT,NOT$IN$USE=0
    
    	This is done so that the user cannot log in to the account until
    	you have finished creating it. You should do the above line as the
    	very last thing. If you've corrected the username business and this
    	unlock problem, please post corrected procedure... Ta!
    
    Regards,
    Paul
1423.17call IOS 'Create User' from a DCL procedure?MEOC02::BEESTONLLiz BeestonTue Aug 24 1993 13:2927
(ALL-IN-1 IOS V3.0-1)

Hi, 
I wanted to get some pointers to some functionality my customer is looking for.
Basically they want to run their complete CREATE_USER operation from a DCL 
procedure. This procedure includes the creation of the IOS account, the X4MAN 
account, definition of access to PATHWORKS file services etc.

At the moment, from the DCL procedure, they call the standard ALL-IN-1 managers 
interactive session and complete the relevant details on the forms displayed. 
When they are finished they return to the DCL procedure.

What they want to do is to be able to call the IOS 'create user' functionality 
directly from the DCL procedure, passing all the required user details into 
an IOS procedure that then calls all the right things to create the IOS account. 
The main aim of this is that person creating the new IOS account (either the 
manager or an administrator) will not have to use the IOS forms interface.

I assume that this is possible through some IOS customization but I wanted to
get some response to the following

- is it possible and how big a customization is it? 
- some basic pointers as to the components I should look at
- has anybody done this, or something like it, before so that I may not have 
to reproduce the already existing.

Thanks for any info... Liz
1423.18is mua_com (P.Tallett) not enough?IOSG::TYLDESLEYTue Aug 31 1993 11:2117
    Hi Liz. Been away for a week. I'd like to help here if possible,
    but not sure what you are wanting now? Do the information and
    procedures in #1423 not give you a good starting point, or are you
    looking for something more?
    
    One thing your application could concentrate on, is to use a chosen
    account template to extract many of the required details before
    running. Then the .com would not have to provide them.  Another
    possibility is to make it a 'multiple' create user, so that only the
    few account details that need to vary each time (e.g. VMS username) can
    be provided, but the DCL procedure can make lots of accounts in one go. 
    I've been working on some of these things 'in my spare time' (:-) here,
    but they've never been proper formal requirements that could be put
    into the product.
    
    Cheers          
    DaveT