Solved

How to Prevent SBS_LOGIN_SCRIPT.bat from Running on Domain Controller (SBS 2003)

Posted on 2010-09-14
9
1,185 Views
Last Modified: 2012-05-10
How do I Prevent SBS_LOGIN_SCRIPT.bat from Running on Domain Controller (SBS 2003)?

Here's the thing. There are a couple of  mapped drives, P and Q (to \\myserver\blabla) that are accessible through their letters, but they don't appear on file explorer (or in DOS). The files do appear if I search by name, however I can't right click on them (I wanted to outsmart windows by Opening Containing Folder...)

The problem that this is creating is that I can't select those folders or anything in them in when selecting files for the backup set for our backup software, therefore... those files aren't being automatically backed up.

To be honest, I saw this http://www.experts-exchange.com/OS/Miscellaneous/Q_22914795.html and didn't understand a thing. Just seeing VB script makes me tremble. I'm not a techie.

I tried unmapping the drives to the network paths, but it doesn't help - and if I logoff/login the script that maps them runs again.

Can I do something like IF 'this computer name is not such and such' THEN map the drive (but else don't) ?

Thanks!
0
Comment
Question by:drotkopf
  • 5
  • 4
9 Comments
 
LVL 77

Expert Comment

by:Rob Williams
ID: 33678772
If you are using one general batch file logon script (default with SBS) you can just add something like:

If "%ComputerName%" == "SBSname" Go To SKIPTO
rem lines you do not want to process on the SBS
net use X: \\Server\Share
:SKIPTO
rem rest of lines to be applied to all systems

[note %computername% is a variable do not change this, just change SBSname to your SBS name]

If drives are already mapped on the SBS you may have to disconnect them or run from a command line
net use * /persistent:no

This can all be controlled in group policy as well, but just adding the two lines to the batch file is simple.
0
 

Author Comment

by:drotkopf
ID: 33678851
RobWill - I had done something like that while waiting for the answer:

if not %computername% == CS01 NET USE P: \\cs01\Public_Directories

The script works great... but it didn't solve the underlying problem of not being able to navigate to the C:\Public_Directories folder using DOS or file explorer :-(

Ideas?
0
 
LVL 77

Expert Comment

by:Rob Williams
ID: 33681960
I appologize but I am not sure I understand fully.
Are you saying you cannot access using the UNC name \\server\share from a command line?
Or you cannot access using the mapped drive to the same folder?

You would be best to eliminate any drive mappings and recreate them on the server, for example

If Not "%computername%" == "CS01"  GoTo NEXT
Rem delete all existing mapped drive connections and recreate at each logon
Net Use  /persistent:no
Net Use  *  /delete
Net Use P: "\\cs01\Public_Directories"
:NEXT
 
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:drotkopf
ID: 33687953
RobWill-

Let's say that
- server name is S1
- folder is C:\F2 which is shared as N3
- I map Q: to \\S1\N3

a) I AM able to access using UNC name \\S1\N3 from a command line from all over the network and from the same server (DC) itself.

b) I AM also able to access it using the mapped drive (Q:), both from a command line or with Explorer navigation.

c) I AM NOT able, though, to access that folder C:\F2, not using explorer (I expand My Computer, I see C:, I expand C: and F2 does not appear!) and not through command line (C:, CD \, dir, it doesn't appear)

Thanks!
0
 
LVL 77

Expert Comment

by:Rob Williams
ID: 33688244
That sounds more like the 'hidden' attribute of that folder is enabled.
Try opening a command line and enter  C:
then enter   attrib F2
It should return  C:\F2
But if it returns     H   C:\F2  it is hidden.
To correct or make sure  run   attrib  C:\F2  -H

You can also do using the general tab of the folder properties, but I find the attrib command more dependable
0
 

Author Comment

by:drotkopf
ID: 33693709
The attributes that is comes back with are:
    SHR

When I run attrib C:\F2 -H it comes back with
    Not resetting system file - C:\F2

That makes me think that the S is telling me that the F2 folder is a system file.

Now, we are talking about users files in there like quickbooks files, word, excel, PDFs, etc.

So i have 2 questions:
1) Should I run attrib C:\F2 -S and what are the consequences of that?
2) Why if I have show hidden files and folders selected for these (and all other) folders, it still doesn't show them?

Thanks!
0
 
LVL 77

Accepted Solution

by:
Rob Williams earned 500 total points
ID: 33693807
SHR would indicate System File, Hidden, Read only.

I would run          attrib  C:\F2  -S  -H  -R       and remove all of those attributes. No harm at all in doing so unless they are something like windows system files. Even that is only a risk if someone were to delete them.
Sow hidden files won't help because they are tagged as system files. Enabling viewing of system files and hidden files should do it.
0
 

Author Closing Comment

by:drotkopf
ID: 33694167
Thanks
0
 
LVL 77

Expert Comment

by:Rob Williams
ID: 33694196
Thanks drotkopf. Glad to hear you were able to resolve.
Cheers!
--Rob
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The problem of the system drive in SBS 2003 getting full continues to be an issue, even though SBS 2008 and SBS 2011 are both in the market place.  There are several solutions to this, including adding additional drive space or using third party uti…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question