Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2221
  • Last Modified:

using Kixtart 4.22 to map drives in windows 2003

Hello,
Just want to find out if there is any difference in how is used to map drives in windows 2003 and any other version. I have created a batch file called logon.bat(which contains only this command" kix32 login.kix" ). Then i have created a logon.kix(which contains this command
use "m:" "\\bgs-it100\folders"
use "y:" "\\bgktts.com\data"
Then i place these two files and the kix32.exe in the scripts folder under SYSVOL in my DC.
Now when i logon as a user, the drives are not map till i run the debug associated with the kixtart. Just don't know if it from windows 2003 or what. Need help badly.

Cheers
0
it_gsr
Asked:
it_gsr
  • 6
  • 6
1 Solution
 
TannerManCommented:
This is a strecth, but the network shares you created.............did you open up securtiy settings (NTFS) for the physical folder and give permissions correctly? Windows 2003 server does NOT default set everyone full control like older versions. Just creating a share with permissions does not work,,,,by itslef.

Taking kixtart out of the picture,,,,,go on the 2003 server create a network share and give permissions in both the SHARE properties and the physical folder SECURITY. Then, as a logged on user, try to connect to the share. This is just to test that your getting the share setup right. You could even leave off my suggestions on SECURITY for physical folder and test my theory on 2003 default permissions.

I know nothng of this kixtart, but just trying to help.
0
 
it_gsrAuthor Commented:
TannerMan,
Thanks. I have done the permission on the folders but what i want is the folders to be map automatically when a user logs on.
0
 
Chris DentPowerShell DeveloperCommented:

I've noticed one instance where drives don't map using Kix.

The problem occurs when a drive mapped in DOS doesn't disconnect from the drive letter. Also trying to remove the mapping using Kix fails (or more to the point just has no effect). The only solution I found for that problem was adding "net use <drive> /d /y" to the logon.bat file.

To check for that one, run "net use" on one of the PCs having the problem and see if it reports the drive with a disconnected mapping.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
it_gsrAuthor Commented:
Hi,
This is what i have in the logon.bat

kix32.exe login.kix:
net use "m:" /d/y            
net use "y:" /d/y

and this in the logon.kix:
use "m:" "\\gsrgh.com\server structure"
use "y:" "\\gsrgh.com\bgsgoldcs"

But the drives are not apearing.
0
 
Chris DentPowerShell DeveloperCommented:

Logon.bat should be the other way around (you need to kill the mapping in DOS before you can remap it with Kix):

net use m: /d /y
net use y: /d /y
kix32.exe logon.kix

You need the spaces between the /d and /y for the command to work.

Your use of the Share Path in Kix is also incorrect, well unless you really called your domain com - which would be fun if you tried to resolve any external .com address ;).

If you are going to use the full DNS Path it should be:

use "m:" "\\<servername>.gsrgh.com\server structure"
use "y:" "\\<servername>.gsrgh.com\bgsgoldcs"
0
 
it_gsrAuthor Commented:
This in the logon.bat:
net use m: /d/y            
net use y: /d/y
kix32.exe login.kix


and this in the logon.kix
use "m:" "\\bgs-it005.gsrgh.com\server structure"
use "y:" "\\bgs-it005.gsrgh.com\bgsgoldcs"

Don't know if i have mistakes in b'cos still not working.
0
 
Chris DentPowerShell DeveloperCommented:

You still need the spaces:

net use m: /d /y

It can't use /d/y because it's not a valid switch.
0
 
it_gsrAuthor Commented:
I have added the spaces but still not mapping
0
 
Chris DentPowerShell DeveloperCommented:

Try this first:

#logon.bat#

net use m: /d /y
net use y: /d /y
net use m: "\\<servername>.gsrgh.com\server structure"
net use y: "\\<servername>.gsrgh.com\bgsgoldcs"

Can you confirm that works?

If not any chance you could just post the full contents of all your scripts files?
0
 
it_gsrAuthor Commented:
Thanks Chris-Dent. Is working now. Did is what i did.
In the logon.bat, i entered these commands:

net use p: /d /y
net use y: /d /y
net use p: "\\gsrgh.com\server structure"
net use y: "\\gsrgh.com\bgsgoldcs"
I did not use the server name b'cos these folders are dfs root so i was still able to get to them.

Then within the logon.kix, entered these command:

use "p:" "\\gsrgh.com\server structure"
use "y:" "\\gsrgh.com\bgsgoldcs"


So in all i have to copy the kix32.exe, logon.bat and the logon.kix into the scripts in Sysvol folder.
Thanks man.

0
 
Chris DentPowerShell DeveloperCommented:

Glad it's working now. I don't think you're using the kix script at this stage, but if you don't need it then there's no problem there :)
0
 
it_gsrAuthor Commented:
It think i will need it to do other things very soon. Let me just ask you a question out of this. Like i said, the server structure is a dfs root with many departmental folders. Now what i want is that, if a user in the fiinance departement logons on, he will not be able to see the other departmental folder at all. I will post the question rite now. Any idea?

Thanks
0
 
Chris DentPowerShell DeveloperCommented:

I'm not too sure how it handles mappings to the DFS root, it could be that that's causing problems.

Still, there are always ways around. We could make kix issue a shell command and use the DOS Net Use rather than it's own function.

To make sure it can handle group queries try:

#test.bat#

kix32.exe test.kix

#test.kix#

If InGroup("Domain Admins")
    ? "Hellow World"
EndIf

Run it from the command prompt and see if it writes "Hello World" out. You'll need Kix32.exe in the same place you run it from.

If it displays that then there's no problem grabbing group names and the rest will follow.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

  • 6
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now