Archive for the 'Windows' Category

Windows files and Unix files (Redhat, Ubuntu, etc) are encoded in different ways. Namely, the end of line that is a part of most files created in Windows is not compatible with Unix. You can usually see this because there is a ‘weird character’ at the end of each line. ‘cat’ does not show it, but ‘cat -e’ will show these characters:

xx.xx.125.240 spc240.xx.xx^M$
xx.xx.125.241 spc241.xx.xx^M$

The ^M is a Windows ‘End of Line’ character.

Fortunately there is an easy way to fix these for using them in a unix based system.

Install ‘dos2unix’, and then run the file through them:

dos2unix filename

You can even run these on a bunch of files:

[root@ns1 ~]# dos2unix RDNS-*
dos2unix: converting file RDNS-xx.xx.81 to UNIX format …
dos2unix: converting file RDNS-xx.xx.82 to UNIX format …
dos2unix: converting file RDNS-xx.xx.85 to UNIX format …
dos2unix: converting file RDNS-xx.xx.95 to UNIX format …
dos2unix: converting file RDNS-xx.xx.100 to UNIX format …

‘cat -e’ will show that these files are fixed.

You can also use the program ‘recode’.

The Remote Desktop connection settings for Windows Server 2008, and I believe Windows Vista, includes 3 levels of service:

  • Don’t allow connections to this computer
  • Allow connections from computers running any version of Remote Desktop (less secure)
  • Allow connections only from computers running Remote Desktop with Network Level Authentication (more secure)

windows_server_2008_remote_desktop_properties

At first blush, you would probably choose the “more secure” option. Practically, this mainly means that it only allows connections from the latest Remote Desktop software in Windows Vista. It is probably another attempt by Microsoft to force consumers and businesses into upgrading to Windows Vista. But… I digress.

When connecting with an older Terminal Services (TS) client in XP or even Vista, you will get this message:

“Remote computer requires Network Level Authentication, which your computer doesn’t support”

the-remote-computer-requires-network-level-authentication11

Not all is lost. There are two ways around this. The first and most obvious solution is to select the less secure option and disabled Network Level Authentication (NLA). If you are in an environment that does not allow this change, or there are some other circumstances where you need to keep Network Level Authentication enabled, you can get a Remote Desktop connection from Windows XP.

The first step is to download the latest Remote Desktop Client for Windows XP. As of the writing of this article, the latest version is 6.1.

For XP SP3: here

For XP SP2: here

That is not it. For XP, you need to enable CredSSP – Credential Security Service Provider.

CredSSP is a new Security Service Provider (SSP) that is available in Windows XP SP3 by using the Security Service Provider Interface (SSPI). CredSSP enables a program to use client-side SSP to delegate user credentials from the client computer to the target server.

Directions on how do do this are available at Microsoft here:

http://support.microsoft.com/kb/951608/

The quick and dirty summary:

  1. Click Start, click Run, type regedit, and then press ENTER.
  2. In the navigation pane, locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  3. In the details pane, right-click Security Packages, and then click Modify.
  4. In the Value data box, type tspkg. Leave any data that is specific to other SSPs, and then click OK.
  5. In the navigation pane, locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders
  6. In the details pane, right-click SecurityProviders, and then click Modify.
  7. In the Value data box, type credssp.dll. Leave any data that is specific to other SSPs, and then click OK.
  8. Exit Registry Editor.
  9. Restart the computer.

For more information on CredSSP including how to deploy this setting using Group Policy, see the CredSSP page here.

Let me know if you have any other tips or a simpler way to connect to the more secure version of Remote Desktop.

I am currently copying my DVD collection to my PC for use in my media center downstairs. I have an generic process down, that works very well, but it requires a bunch of clicks to do. While figuring out how to Autoplay a DVD using ZoomPlayer rather than the built in Windows Media Player, I thought, why not add a “Rip DVD with Handbrake” option.

This is actually pretty easy to do, so I thought I would share so that anyone looking to do a similar thing could easily set it up.

First thing, I am assuming you have Handbrake installed and running. Also, unless you are only copying non CSS protected DVDs, you will need a program such as DVD43 or AnyDVD which automatically decrypts the DVD on the fly.

After ensuring those work (and tested by copying a DVD via the GUI interface) then we can begin to set up your PC so that Autoplay can copy the disks.

To modify the AutoPlay options, you first need to install TweakUI from Microsoft. Run it and navigate to the Autoplay options.

Tweakui

Click “Create” and Fill out the name and program description. Click “Change Program” and select HandBrakeCLI, which is installed into C:\Program Files\Handbrake\ by default.

If you want, you can change the icon, use the Icon from Handbrake.exe (it looks prettier!).

In the Args: field, use:

-i "%L\VIDEO_TS" -o "D:\DVD\Movie_%RANDOM%.m4v" -L -p --preset="AppleTV"

These options mean:

  • -i: source
  • -o: output
  • -L: Select longest title
  • -p: Store pixel aspect ratio in video stream
  • –preset: Which preset to use (use HandBrakeCLI –preset-list  to get a valid list)

Don’t forget to check off “DVD”.

When done it should look like this:

Autoplay

When its done, you will get an autoplay option with the Description you set above. When clicking on it, you get your movie encoded straight up:

handbrakecli

Thats it! When you insert a DVD, you are automatically asked if you would like to play it, or in this case, rip it. Just a small note, this is only for XP, I don’t know if it works on Vista or not. Also, the file name is static, I haven’t figured out how to get it to read the title from the disk, although I’m working on it.

For a full list of HandbrakeCLI options, see: http://trac.handbrake.fr/wiki/CLIGuide

Also, with the -L option; it selects the longest title on the disk. This works great for movies, but if you are trying to copy TV episodes or something with a bunch of smaller titles, then you would have to do it the normal way.

Please let me know if you have success with this or if you’ve improved upon it in some way!

It is possible to install Active Directory authentication in Ubuntu 8.04 and later. The Likewise Open packages accomplish this task, and it is actually pretty easy.

Just a note – when installing Ubuntu, do not add a user named “administrator” as I did. This makes it impossible to join the Ubuntu workstation to the domain using the “administrator” active directory user – but you can use a different Domain Administrator username and password.

The steps to follow:

  1. sudo apt-get install likewise-open
  2. sudo domainjoin-cli join fdqn.yourdomainserver Administrator
  3. sudo update-rc.d likewise-open defaults
  4. sudo /etc/init.d/likewise-open start

As a side note – you should also consider adding the following code to make it so that users do not have to login with DOMAIN\username on the ubuntu login screen. You can do this by changing /etc/samba/lwiauthd.conf and adding this line:

winbind use default domain = yes

Also, another helpful tidbit of information is getting your Ubuntu machine to resolve netbios domain names. You can do this by adding missing entries to the following lines in /etc/nsswitch.conf:

passwd: compat winbind lwidentity
group: compat winbind lwidentity
shadow: compat winbind
hosts: files dns winbind

If you receive an “ERROR” message when you try to login to Ubuntu, it could be because the likewise-open service isn’t running. Running “update-rc.d likewise-open defaults” should start it but troubleshoot this script to make sure it is indeed running on boot.

For More Information:
Official Likewise-open page on Ubuntu

If you receive this error while opening Excel or other Microsoft Office programs, it is usually caused by an Adobe PDF addon that is having problems. According to Microsoft, this can happen if:

1. The Microsoft Office Startup folder or the Microsoft Excel Startup folder contains either or both of the following Adobe Acrobat PDFMaker add-in template files:
Pdfmaker.dot
Pdfmaker.xla
AND
2. Norton AntiVirus software is installed.

To fix it, delete the files from the startup Office folder. There are a few locations it might be, in my case it was in C:\Program Files\Microsoft Office\Office12\XLSTART. See this Microsoft KB Article on fixing the error.

  • Welcome to systemBash, a technology and system administration blog by David Drager. If you enjoy this sort of content, can can subscribe to the RSS clicking on that big icon to the right.