network-shares interview questions

Top network-shares frequently asked interview questions

Why is it bad to map network drives in Windows?

There has been some spirited discussion within our IT department about mapping network drives. In particular, it has been said that mapping network drives is a bad thing and that adding DFS paths or network shares to your (Windows Explorer/Libraries) favorites is a far better solution.

Why is this the case?

Personally I find the convenience of z:\folder to be better than \\server\path\folder', particularly with cmd line and scripting (of course I'm not talking about hard-coded links, naturally!).

I have tried searching for pros and cons of mapped network drives, but I haven't seen anything other than 'should the network go down, the drive will be unavailable'. But this is a limitation of any network-accessed storage.

I have also been told that mapped network drives poll the network when the network resource is unavailable, however I haven’t found more information on this. Do network drives poll the network any more than a Windows Explorer library/favourite? Wouldn't this still be an issue with other network access mechanisms (that is, mapped Favourites) whenever Windows tries to enumerate the file system (for example, when a file/folder picker dialog is opened)?

Source: (StackOverflow)

How do I connect to a network share via the Windows Command Prompt?

Is there any way to connect to a network share via cmd.exe?

Source: (StackOverflow)

Action can't be completed - open in another program

I have two screens with two Explorer windows open. Both are showing different subfolders in the same network path.

I pick a folder on the left window that I'd like to move to the right window, I drag it across, and an alert pops up:

The action can't be completed because the folder or a file in it is open in another program.

This is probably just the file indexer or the thumbnail database or whatever. I don't care, I want to do it anyway. This happens literally every time I want to move or rename a file or folder on a network drive.

How do I fix this?

Source: (StackOverflow)

How can I Map a Network Drive with Password so it stays mapped after a reboot?

I mapped a network drive to a location that needs a password. Now whenever my computer starts up, it tells me that it could not connect to that network drive because a password is needed.

How do I make set my computer to remember the password for that mapped network drive?

My PC is running Windows XP Professional

Source: (StackOverflow)

list network shares from command prompt

Is it possible to browse a network for shares from the Windows command prompt?

I want to map a drive to a network share (pushd), but I can't remember the exact name of the machine or share. Is there a way to browse the network to find the shares via the command prompt?

Background: my Windows install was corrupted after an update and nothing's working now. I haven't backed up in a month, and I'm trying to do one final backup before I wipe it clean.

Source: (StackOverflow)

Mac OS can't connect to SMB shares after sleep

I used to access my local Windows 2008 file server's SMB shares on my recent (3 weeks old) MacBook Pro without problems. However, for a few days now, it fails to (re-)connect to the server after it woke up from sleep mode.

Finder just shows "connecting..." and hangs indefinitely. The same thing happens when I try it from the command line (mount -t smbfs). This happens via both WiFi and cable, I also tried turning networking off and back on. The only thing that helps is a reboot.

Any hints?

Edit to clarify: It's the Mac that's being put to sleep, not the server. I also found out that if I disconnect the shares before I put it to sleep, it will be able to reconnect after waking up.

Another Edit:

I did some more investigation and sniffed the network traffic. The Mac sends NetBIOS name queries and a status request (NBSTAT) to the server, the server responds, everything seems fine. After that, the Mac should open a SMB connection, but it doesn't do anything. No more packets follow.

I then found out that the real problem lies deeper. It seems it doesn't open a new connection because it thinks the old one, which has of course timed out on the server side, is still active. However, any program that tries to access its mount point or just the /Volumes directory hangs and can't even be killed. umount /Volumes/share - hangs. ls /Volumes - hangs. kill -9 any of these - doesn't help. Also, opening a file open dialog in any application causes it to hang as well!

The only thing that helps is a hard reboot. It seems to me there's something fundamentally wrong in OSX's SMB implementation if a timed out connection can trigger something like this.

Source: (StackOverflow)

How Do I Map a Drive Network Share Using the Linux Terminal?

Still getting used to Linux, and the GUI is great. I have Ubuntu 10 and I can go to Network and see the Windows network. Then double clicking this gets me to the drives that are shared. Then when I go back to the terminal and use:

cd ~/.gvfs

I can see the mapped drives. But it would be nice if I could this without all the mouse clicking. So how do I map network drives in the terminal, something akin to net use for Windows.

EDIT: Not sure what happened, but this is what I did to get it to work. I created the directory for the share in /media and then ran:

sudo mount -t cifs -o username=nicorellius //server/share/ /media/share

and it said command couldn't be found. So i thought I would go ahead and use smbfs so I ran:

sudo apt-get install smbfs

I tried the command suggested with smbfs instead of cifs and that didn't work either. So I tried again and then the next time I ran:

sudo mount -t cifs -o username=nicorellius //server/share/ /media/share

it worked and I could navigate to the directory with cd.

Source: (StackOverflow)

Turn off windows 7 message "could not reconnect to all network drives"

How do I turn off the little popup bubble in systray that says "could not reconnect to all network drives" ?

I am aware that a particular drive is only accessible at certain times so I dont need an annoying little popup message evertime I reboot.

Ive seen similar popup messages get hidden through means of registry editor, but google turned up no answers for this one.

Source: (StackOverflow)

Why is Notepad++ so slow when dealing with files stored on a network share?

Recently Notepad++ seems to be very slow when dealing with files that are located on a network share.

I am editing small files (e.g. web.config) and it is slow to:

  • Initially open a file on a network share.
  • Switch tabs back to a file on a network share.
  • Switch back to notepad++ after using another application.

My guess is when switching tabs back to a network file it tries to check if someone else has modified the file (I could live with turning this off and it could check on save).

I am on a "fast" local network and have only noticed this problem recently.

My local PC is Windows 7 Enterprise and the servers are Windows Server 2003 and 2008.

Source: (StackOverflow)

OS X: How to avoid having to re-connect to network share after NAS was turned off?

I use Mac OS 10.6 to connect to a NAS drive using the afp protocol (Finder -> Go -> Connect To Server). I have set up the NAS to automatically power off during the day, and power on in the evening. Now what happens is this: each time the NAS powers off, the network share disappears. After the NAS has turned on again, I have to manually re-connect to the network share.

My girlfriend uses Windows 7 to connect to the same share. For her, when the NAS is off, the network drive is still visible in "My Computer", albeit with a "not connected" marker. When the NAS is on, she simply opens the network drive and Windows notices that it is available again.

Is there a way to make Mac OS behave in a comparable way to Windows here? I want Mac OS to automatically reconnect to the drive when it is available again (or at least when I try to access it).

I know I can turn the connection into a login item, but I rarely re-login. I want this to work automatically, while already being logged in.

Source: (StackOverflow)

Can a mapped network drive be reconnected from the command line?

On a daily basis I find myself in the Windows command prompt needing to access a network drive that is mapped but disconnected. I have yet to find a command that will reconnect this drive without unmapping and remapping (which leads to a password guessing game, since I don't own these computers). I would also like to be able to script this so every night the drive is reconnected if it has become disconnected somehow.

The fastest solution I currently have is to:

  1. Type "start." to open explorer,
  2. Alt-D to focus the address bar,
  3. type the drive letter I want and press enter, and wait for it to display the drive contents,
  4. then finally, close explorer and go back to the command prompt.

I know it's a minor inconvenience, but I'm often doing this through a slow VNC or PCAnywhere connection where doing anything through GUI is awful, so I'm just wondering if there's a better solution.

Source: (StackOverflow)

Is there any way to prevent a Mac from creating dot underscore files?

At work we're letting one of our very tech savvy clients actually help out a little with a few development projects specific to him. However, he uses his own personal Macbook, and as he edits files on our (Windows) networks, his Macbook always creates a bunch of unnecessary meta files that we end up deleting later.

For instance, it creates a file called .DS_Store in any directory he opens, as well as "dot underscore" files for each file he edits. So for instance, if he's editing a file called "Main.php", his Macbook will create another file called "._Main.php".

I know there are ways to prevent creation of .DS_Store files, but none about how to prevent creation of these hidden files prefixed with dot underscore.

Is there any way to turn that off on Macs? Any way to prevent it from creating those files in the first place?

Source: (StackOverflow)

Samba+Windows: Allow multiple connections by different users?

I have a machine running Ubuntu with Samba that I use to share stuff with my family's Windows machines in our local network. Currently they access a share for movies/music/etc with one user.

I want to connect them to another share as a different user (for example, user "goytacaz").

When I try connecting to this new share, Windows gives me "Error 1219" and complains about multiple connections by the same user.

How do I get my machine to accept multiple connections by the same user?

Source: (StackOverflow)

How do I resolve the error "The local device name is already in use."?

I try to map a network resource to my local device.

I receive the following error: The local device name is already in use.

I have the problem to find which purpose the device is used for. I try a command net use and do not see it in the list, therefore, it is not mapped to a network resource.

Does anybody know how to see the list of all used devices in Windows 7?

Source: (StackOverflow)

Security Concern with my Windows 7 Box at Work

This question may be weird and misworded but I'm not a Windows expert by any means so feel free to correct me.

The group I'm in recently got new computers at work. They gave me a new computer and hooked up my old computer to the network for a week so I could take my time transferring necessary files/configs etc. The Support Guy said, "Just go to 'run' and type in \\PCNAME\c$. So I did and, low and behold, there's my old C: drive. I thought to myself, "What a huge security issue. I'll just transfer everything quickly and then 'un-share' it."

The end of the day came and I logged in through remote desktop and right clicked on the C drive. But it was not shared. I called The Support Guy and explained to him that I didn't want my C drive available to everyone on the network all weekend. He seemed confused. He said, "It's not really 'shared'. If you go to the command prompt and type in \\ANYPCNAME\c$ you get their C drive. That's just how it is."

I hung up the phone and walked over to a coworker's desk and looked at his PC name (there's a sticker on every computer) and then walked back to my desk and put a hello file on his desktop.

I don't keep anything personal on my work computer but there are definite security concerns. Not really from within the group I'm in but from the hundreds of other employees on the network (and domain) that I don't know. I'm fine with practical jokes but what if someone has an unknown grudge against me (or someone with a similar name or computer name) and adds nasty language against my boss to documents which are part of a project?

Is this an inherit part of how Windows domains work? Are there any steps I can take to make my box a little more secure? Bear in mind that I do have admin rights to the box but I can't change anything as far as the network or domain goes. Even just an explanation of what's going on would be a big help as this goes against everything that I know to be 'pretty basic' about computer systems in general. I'm more familiar with Linux so Windows World is a little foreign to me.

Follow Up

Voiced my concerns about this at work. I was told, "Nobody knows about the drive$ thing so there's nothing to worry about." Followed Darth's solution and added that registry key. Now I'll wait and see if anyone gets alerted.

Source: (StackOverflow)