Thursday, November 19, 2015

The case of the disconnected network drive (that wasn't) who wouldn't go away

Recently I had an issue with some newly images servers having  a disconnected network drive left over on the machine.










When trying to disconnect it, it was throwing this error:
          "This network connection does not exist."

This network connection does not exist














I checked from the command prompt to see if net use could do anything with it, however it was not listed.  I tried opening the drive, and a list of files was displayed.  So in reality it wasn't disconnected after all.  I looked around on google for answers and came across a few possible registry keys that might have it:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2
    and
HKEY_CURRENT_USER\Network

I checked these for all users and in the main HKLM tree, but there was nothing showing this entry anywhere.  Next, I used netstat -ano |find "445" to see what file sharing connections were open, and at least traced it down to a server name.  The server was related to mcafee, which is what was in the folder content as well.  Digging around a bit found the exact folder that was mapped on the machine. Trying to search the registry again with the server name didn't yield any results.

After failing with all the suggested methods of getting rid of the drive, I decided to try to disconnect it using the SYSTEM context.  So, I scheduled a task to run: net use * /delete /y, and set it to run under the SYSTEM account.  This took care of the problem and the drive is no longer showing up.

Thursday, November 12, 2015

Linux Mint user not listed on logon prompt

I tried adding a few accounts to a linux mint laptop for my kids. When using the GUI users tool, it ended up hanging when trying to create the accounts, so I went back to the normal command line tools for user creation. The accounts were created and were able to logon, by hitting esc to get a username prompt at the gui logon. When trying to find a solution for this, most people point to the UID value needing to be over 1000. The accounts that I created were 1002 and 1003, so no luck with that solution. This setting is in /etc/mdm/mdm.conf, in the [greeter] section, MinimalUID=1000. After digging around and looking at the working accounts, I noticed the command line tools missed some of the user details in /etc/passwd. Column #5 (user ID info was missing) and shell was left blank. For the working users, column #5 had the username and 3 comma's after it. After adding this to /etc/passwd, all accounts were listed as they should be.

Non-functional entry:
testuser:x:1002:1002::/home/testuser:

Functional Entry:
testuser:x:1002:1002:testuser,,,:/home/testuser:/bin/bash