Monthly Archives: September 2013

Windows 7 File Sharing Client Quirk

If you are like me you might have multiple user accounts on the target windows box and you might want to switch the network credentials used to login by the Windows. One thing which I have found extremely annoying is the tendency of Windows Explorer to remember your last credential even when you have kept the “remember credentials” checkbox unchecked. I am not talking about credentials which you ask Windows to “remember” but about credentials which you don’t want Windows to remember so that if I closed explorer and re-opened the explorer and tried to access a remote computer’s file share I should be asked for the credentials again. I don’t know if this is a Windows 7 specific behavior or not but I am facing this issue on Windows 7. This logon is basically cached for your convenience. But what if you don’t want your credentials to be cached, what if you want to switch your credentials rapidly. This might sound stupid to some but it is helpful once in a while.

Well I found a workaround which is clunky but works great. Open a command prompt in administrator mode and execute the following command.

net use \\your_remote_computer\share /delete

This command basically terminates the connection to your remote computer if it’s not already terminated. If you want to terminate all your connections then execute the following command instead of the above command.

net use * /delete

The above command ensures that all connections to any remote computers are terminated. This command might ask you for confirmation in the command prompt. Answer “yes” for all connections. Now follow up with the following command:

klist purge

This command basically terminates the Kerberos Ticket for the credential you had for your remote computer if it has not already been done.  Please note you need to ensure that the connection to the remote computer has been terminated and then purge the outdated kerberos tickets for closed connections so you need to execute the 2 commands in sequence. This will ideally solve this little problem.

 

Locale issue in Linux VPS Box

In case of a new Linux VPS box it is possible that you might encounter an error like this:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = “UTF-8”,
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).

To solve this error the following approach worked for me on my Debian box. Execute the following command

sudo vi /etc/ssh/sshd_config

In this file comment the following line. This line basically allows the client OS to pass it’s environment parameters to the remote server which can cause issues.

AcceptEnv LANG LC_*

Save the file and reboot the VPS box. After rebooting this error should not ideally come. If you are still getting this error then it is possible that you don’t have the locale installed. The following command might help you in resolving this problem.

sudo locale-gen
sudo dpkg-reconfigure locales

 

Self Motivation!

Need no stars to light the way,
Hold no hands to cross those hurdles,
Borrow no words to floor the world,
Look for no shared glory to shine,
Make no friend pay your price,
When you find your feet,
Others fall in step.

A truly inspiring quote which often come in handy.