Absent Member.
Absent Member.
1582 views

Login script help

I need help with my login script please. I am getting pretty convoluted with my drive mappings. Is there a better way to map my drives so I can map all drives to all users and rely on group permissions for access? I thought when we tried this before if a drive was mapped and you didnt have access is generated an error. Any help would be appreciated.

Here is the current script.

MAP INSERT S1:=SCCNW01/SYS:PUBLIC
rem MAP INSERT S2:=OPSNW05/APPS:
MAP INSERT S2:=SCCNW01/APPS:

MAP S:=SCCNW01\DATA:
Map T:=SCCNW01\DATA:\Public

Rem *** ALL DOS COMMANDS SHOULD GO IN THIS BATCH FILE ***
#Z:\PUBLIC\LOGINBAT.BAT

Rem *** Track-It Inventory ***
IF OS="WINNT" THEN
rem #Z:\PUBLIC\TI_Inven_SCC_DCA.bat
END

Rem *** Group Specific Actions ***
Rem ------------------------------

IF MEMBER OF "OPSNW05 Access" THEN
Map J:=OPSNW05\DATA:\Public
Map P:=OPSNW05\DATA:
END

IF MEMBER OF "Div MIS" THEN
MAP V:=SCCNW01/IT:
rem MAP W:=SCCNW02/SYS:
END

IF MEMBER OF "SCC CAD Data Access" OR MEMBER OF "SCC CAD Data Access RO" THEN
MAP K:=SCCNW01/CAD_DATA:
END

IF MEMBER OF "PC-DMIS Controlled" OR
MEMBER OF "PC-DMIS Controlled RO" OR
MEMBER OF "PC-DMIS Development" OR
MEMBER OF "PC-DMIS Development RO" OR
MEMBER OF "Project Management" OR
MEMBER OF "Project Management-Norm Park Access" OR
MEMBER OF "Project Management- Time Sheet Access" THEN
MAP N:=SCCNW01\DMIS:
END

IF MEMBER OF "SCC Human Resources - ReportSmith" THEN
MAP P:=OPSNW05\DATA:
END

IF MEMBER OF "LPCS-CMM ACCESS" THEN BEGIN
MAP R:=OPSCMM01\CMMPROD:
MAP Q:=OPSCMM01\CMMDATA:
END

IF MEMBER OF "RDM" THEN
MAP W:=OPSNW04\WORLDVIEW:
#Z:\PUBLIC\SYSMOD %WINDIR\RDM.INI REPLACELINE RDM_WV_AREA= RDM_WV_AREA=w:\rdm\%LOGIN_NAME
#Z:\PUBLIC\LOGINBAT2.BAT
END

IF MEMBER OF "Worldview" THEN
MAP W:=OPSNW04\WORLDVIEW:
END

Exit
Labels (1)
0 Likes
8 Replies
Absent Member.
Absent Member.

If I was you I would reconsider the need for having a drive mapped. Do your user need to have a drive mapped to the root of the data?

Most places have something like:
users home drive = H:
departmental drive = G:
team drive = M:
company shared drive = J:
servers /public drive = Y:
apps drive = N:

For departmental and team drives you could base it on group membership. Depends on how you have your edirectory configured and your organisational structure and your file system layout.
0 Likes
Absent Member.
Absent Member.

IF OS="WINNT" THEN
rem #Z:\PUBLIC\TI_Inven_SCC_DCA.bat
END

This section does nothing. REM it all out or delete it entirely.

IF MEMBER OF statements are very expensive in processing time. eDir has to scan the entire membership of the group even if it gets a hit in the first membership comparison. Far better is to arrange users in OUs so each has appropriate login scripts for it alone; using the INCLUDE statement can call in scripts from other OUs too.

That said:
Are users generally members of more than one of those groups? If not you could speed things up by putting EXIT before the END statement in the appropriate IF paras.

Does "#Z:\PUBLIC\LOGINBAT.BAT" contain an exit statement? It should not, as if it does the user will never close the login script file.

Andrew C Taubman (Sorry, support is not provided via e-mail) Opinions expressed above are not necessarily those of Micro Focus.
0 Likes
Absent Member.
Absent Member.

Yes, users are generally members of several groups. I do not have seperate OU's set up currently and would like to avoid doing so if possible. The current system has been in place for years and I dont want to go making changes that I dont really have to. The loginbat.bat does not contain an exit at the end of the batch file. Isnt there a way to just map all the drives with one statement and let group membership do what it is supposed to do? Forgive me if this is a dumb question, I am not a Novell expert by any means.

Erik
0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

I would say pretty much what the rest have said. Ie are really all those MAPs necessary. Reading groups that way is going to be expensive. so, let's have a look at a few bits:

>Map J:=OPSNW05\DATA:\Public
>Map P:=OPSNW05\DATA:

Do they really need a mapping to J, here as "Public" is a subdir of J?

>IF MEMBER OF "PC-DMIS Controlled" OR
>MEMBER OF "PC-DMIS Controlled RO" OR
>MEMBER OF "PC-DMIS Development" OR
>MEMBER OF "PC-DMIS Development RO" OR
>MEMBER OF "Project Management" OR
>MEMBER OF "Project Management-Norm Park Access" OR
>MEMBER OF "Project Management- Time Sheet Access" THEN
>MAP N:=SCCNW01\DMIS:
>END

Assuming you have the rights set up correctly,then just MAP N
0 Likes
Absent Member.
Absent Member.

If I map N to people that do not have rights, will it give them an error at start up? If not could I just Map all my volumes by default? What is the best way to map the drives? Just Map N:\SCCNW01\DMIS..
0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

Egilbo,
> If I map N to people that do not have rights, will it give them an error
> at start up?
>

Yes, IIRC

- Anders Gustafsson (Sysop)
The Aaland Islands (N60 E20)


Novell has a new enhancement request system,
or what is now known as the requirement portal.
If customers would like to give input in the upcoming
releases of Novell products then they should go to
http://www.novell.com/rms

0 Likes
Absent Member.
Absent Member.

Why would you want to map to a folder where users do not have rights? Yes if they do not have rights they will get an error at startup and the drive will not map.

What is the purpose of the folder you are mapping? Departmental or individual users or company wide or site users ect? What is the file structure and rights?
0 Likes
Absent Member.
Absent Member.

To try and get rid of all my IF mappings. The folder (root directory) contains many subfolders with varying degrees of access (Read Only) for some users. That is why I have so many If statements. Could I use 1 if statement to map the Root- N:\SCCNW01\PCDMIS, then rely on permissions for access? As long as they have some form of rights to N:?
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.