SideBar    Using Mapped Files for Backups
DOWNLOAD THE CODE:
Download the Code 38952.zip

Kerberos and Mapped Drives
In a Win2K domain, the Kerberos authentication functions determine whether you can access shares. Kerberos relies on the Windows Time Service during authentication, and if the local computer's clock doesn't show the same time (within a certain tolerance) as the remote computer's clock, Kerberos won't let you access shares on the remote computer.

The default behavior of a Win2K computer in a Win2K domain is to sync its time with the DC's time every 45 minutes. When the clock times match, the synchronization interval is incrementally extended until it reaches 8 hours or until the clocks don't match. (For details about how Windows Time Service works, see Windows 2000 Ready, "Windows Time Synchronization Service," http://www.winnetmag.com, InstantDoc ID 8383.) If you've changed that paradigm, if a computer's clock is losing time because of semiconductor problems, or if the DC's time is wrong, Kerberos settings cause mapped drives to be disconnected.

I learned this accidentally while writing a book about accounting software. Every transaction window in accounting software has a date, so to make sure the book's figures would match the publication date, I set the date on the computer that was running the accounting software to the next year. I saved the figure files to a mapped drive on the computer on which I do my writing. When I finished writing the paragraphs and returned to the computer that was running the accounting software, I found that it had reset its date to the current year. I remembered that the workstation was syncing its time to the DC. The solution, I decided, was to change the system time, then grab the figure before the system next checked its time against the DC's time. However, when I attempted to save the figure file to the mapped drive, I received an error message about security and learned that the mapped drive was disconnected. I couldn't reconnect the drive until I fixed the time. Finally, I logged on to the local computer instead of the domain, saved the figure files locally, logged on to the domain again, then used Windows Explorer to transfer the files to the mapped drive.

A Mapped-Drive Bug
When you map a drive from the GUI, Windows opens a window for the new mapped share as soon as you click Finish. Thereafter, whenever you map that same drive letter, even from the command line, Windows opens a window and displays the contents of the shared resource. If you subsequently use a batch file to map the drive, the appearance of the window interrupts processing (defeating the purpose of an "unattended" job).

To prevent this behavior, Microsoft issued a downloadable fix, which you can obtain by calling Microsoft support. (If you report this problem, you won't be charged for the call.) The support technician will direct you to the proper FTP download of a replacement for the shell32.dll file. The Microsoft article "Mapping a Drive from a Command Prompt May Open a New Windows Explorer Window" (http://support.microsoft.com/?kbid=290703) discusses this problem and suggests a registry fix. However, the suggested registry modification doesn't work.

One way to prevent this behavior is to use only the Net Use command, never the GUI, to map drives. Alternatively, if you use the GUI, press and hold Shift when you click Finish and continue to hold down Shift for at least 10 seconds.

A Powerful Combination
Mapped drives combine computing power with ease of use—a potent combination. Use batch files and logon scripts to share this often overlooked power tool with your users—or teach them to map their own drives—and you as well as they will reap the rewards.

End of Article

Prev. page     1 2 3 [4]     next page -->



You must log on before posting a comment.

If you don't have a username & password, please register now.

Reader Comments

This article has been very useful. Thanks.

Eloy

I like the article. I have used up every letter in the alphabet with my drives. Do you know how I can map more drives? Is there a command in Windows that will maybe let me use letters such as 'AA', 'BB', CC' and so on? If not, is there software I can purchase that will help me accomplish this objective?

David Meyer

For the last few days, we've had a PC start up with mapped drives disconnected. Your article reminded me about the need for clock synchronization. Ours had gotten a little off. Thanks.

Gary Vetter

to david meyer Don't undestand the problem of mapping drive number. I mount my vols under directory as permitted since w2k

cezanna

I am told that in the world of MS, where a server is sharing its drive for applications, when a client runs the application, the application actually runs on the server and therefore uses the server's CPU, Memory resources. This is certainly not true in the Unix world, though it may use a little CPU, and memory as well as I/O bandwidth for the over head of sharing out its drive. In regards to Windows, can you confirm where the application actually runs or point me to some documentation that explains this?

Ron Bogard

Any one knows how to rename (label) a network drive, using command line ? Usually the drive is called: folder on server (letter driver), I wolud like to rename it in FOLDER1 as you can do in driver properties with LABEL box.

Thanks in advance P.

Paolo

Very informative. I grew up in the DOS world. Since GUI the DOS commenads have not gotten daily use. This really helps with the "Use it or loose it" problem. Thank you very much

ASAPCS

Can you tel me how can i rename a network drive eks:h:\\servet01$ to h:\\01s$ thanks marco

Marco

mDrive = "F:\" Set oShell = CreateObject("Shell.Application") oShell.NameSpace(mDrive).Self.Name = "AnyName"

Chizl

Try this on for size, I use it to standardize drive names across my network:

set renameShell = createObject("shell.application") mappedDrive = "P:\" 'Your drive letter renameShell.nameSpace(mappedDrive).self.name = "Drive Name"

Hope this helps...

Will

Does anyone know how to reverse the net config server /autodisconnect:-1 command? Or further, what the other two values are that are changed? How to get them back to their orginal state? Best regards - the guy with the ridiculous username

Tom,Tom,TomClift

Can an ID password be passed with this command?

Anonymous User

does anyone know to have a service map a drive when it starts

ministak

Article Rating 3 out of 5

test

Anonymous User

Article Rating 5 out of 5

I set up drive mapping on this particular computer running W2k awhile ago. Now it won't retain the mapped drive in "My Computer" for restricted user account. The shortcut for the mapped drive disappears after restarting. Now if I tried to set up a new restricted account and the mapped drive shortcut stays, even after restarting. I suspect the profile on the account I created before is corrupted. I would like to know what to check in this situation. Thanks in advance.

Anonymous User

Article Rating 5 out of 5

See More Comments  1   2   3 
 
 

ADS BY GOOGLE