Anonymous_User Absent Member.
Absent Member.
4127 views

Bypass container login script

Hello all-
I'm trying to allow a particular user to bypass his containers default
login script, in order to assign different letters to his drives. I
attempted this, somewhat successfully, by adding in the following line
at the beginning of the container login script:
If "%LOGIN_NAME"="user" then goto end

A few MAP commands follow, and after those is a line with "end".

Now, when the user logs in, he does not get the default drive mappings
- he gets those specified in his personal user login script, which is
what we want. However he gets the following error:

LOGIN-LGNWNT32.DLL-560: This utility could not find the label END

So I have something wrong.. likely something minor. I'm just not sure
what.

Thanks for the help!
-Derek P.

Labels (2)
0 Likes
9 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Bypass container login script

You can create his own personal login script by going to the details of
his user object & clicking on the login script tab. You may have to
delete a drive if you want to give that same letter a different path.

Mike


dmp78 wrote:
> Hello all-
> I'm trying to allow a particular user to bypass his containers default
> login script, in order to assign different letters to his drives. I
> attempted this, somewhat successfully, by adding in the following line
> at the beginning of the container login script:
> If "%LOGIN_NAME"="user" then goto end
>
> A few MAP commands follow, and after those is a line with "end".
>
> Now, when the user logs in, he does not get the default drive mappings
> - he gets those specified in his personal user login script, which is
> what we want. However he gets the following error:
>
> LOGIN-LGNWNT32.DLL-560: This utility could not find the label END
>
> So I have something wrong.. likely something minor. I'm just not sure
> what.
>
> Thanks for the help!
> -Derek P.
>

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Bypass container login script

dmp78 wrote:

> Hello all-
> I'm trying to allow a particular user to bypass his containers default
> login script, in order to assign different letters to his drives. I
> attempted this, somewhat successfully, by adding in the following line
> at the beginning of the container login script:
> If "%LOGIN_NAME"="user" then goto end
>
> A few MAP commands follow, and after those is a line with "end".
>
> Now, when the user logs in, he does not get the default drive mappings
> - he gets those specified in his personal user login script, which is
> what we want. However he gets the following error:
>
> LOGIN-LGNWNT32.DLL-560: This utility could not find the label END


Use exit. IIRC END is used for If statements to indicate the end of an
IF statement.



--
Cheers,
Edward
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Bypass container login script

> So I have something wrong.. likely something minor. I'm just not sure
> what.


At the end of the login script just insert this command verbatim

:END

--
Edison Ortiz
Novell Product Support Forum SysOp
(No Email Support, Thanks !)
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Bypass container login script

Ed,

EXIT terminates execution of the login script, so the User Login script
won't be executed

--
Peter vd Woude
---------
Novell Support Forums SysOp
---------

> Use exit. IIRC END is used for If statements to indicate the end of an
> IF statement.
>



0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Bypass container login script

Derek,

> LOGIN-LGNWNT32.DLL-560: This utility could not find the label END



As Edison points out you need a colon (:) preceding the label name so
:END, however I'd use a label other than 'END' as END is a reserved word
in the script language, which opens up the posibilities for
unpredictable behaviour on different script interpreters.

--
Hamish Speirs
Novell Support Forums Volunteer Sysop.

http://haitch.net

(Please, no email unless requested. Unsolicited support emails will
probably be ignored)
0 Likes
Anonymous_User Absent Member.
Absent Member.

Bypass container login script

Remove "goto" before the END statement THEN "END" When you reference the
goto statement, your telling the script to look for a program called "end"
Also.. I noticed you're using %LOGIN_NAME. I had an issue with user
directory names over 8 characters not mapping. I found out through "Cool
Solutions" using %CN, solves this issue.

Spotsylvania County Government
Spotsylvania, Va.
Greg Hoskins


> Hello all-
> I'm trying to allow a particular user to bypass his containers default
> login script, in order to assign different letters to his drives. I
> attempted this, somewhat successfully, by adding in the following line
> at the beginning of the container login script:
> If "%LOGIN_NAME"="user" then goto end
>
> A few MAP commands follow, and after those is a line with "end".
>
> Now, when the user logs in, he does not get the default drive mappings
> - he gets those specified in his personal user login script, which is
> what we want. However he gets the following error:
>
> LOGIN-LGNWNT32.DLL-560: This utility could not find the label END
>
> So I have something wrong.. likely something minor. I'm just not sure
> what.
>
> Thanks for the help!
> -Derek P.
>


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Bypass container login script

Peter vdW wrote:

> Ed,
>
> EXIT terminates execution of the login script, so the User Login
> script won't be executed


Isn't that what he wants ? Maybe I misunderstand the question....
if user='jdoe' then
map 1
map 2
exit
end

Different mappings for user jdoe and then exit the login script.

--
Cheers,
Edward
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Bypass container login script

The word exit will terminate any subsequent login scripts,
on this case the user login script.


--
Edison Ortiz
Novell Product Support Forum SysOp
(No Email Support, Thanks !)
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Bypass container login script

Thanks for all the suggestions everyone.
I ended up doing what Edward most recently suggested. I had to take
the custom drive mapping commands out of the users script and move them
to the container script of course, but it works fine. This is the only
user that I have to do this for, so there isn't a huge amount of
clutter in the container script.
I first tried adding in ":END" (for the goto command) at the end of the
script, but I would get an error saying that the label END could not be
found.
Thanks again for all the help!
-Derek

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.