Showing posts with label IT. Show all posts
Showing posts with label IT. Show all posts

Monday, March 30, 2009

Ubuntu Terminal Services Client Clipboard Support

Using Ubuntu's "Terminal Server Client" is a great tool for anybody that needs to use VNC or RDP to work on remote machines. It is a nice interface, and has a handy "quick connect" feature that allows you to rapidly connect to a pre-saved server.

I use it extensively to remote control various Windows servers on my work network.

The problem for me has been that clipboard copying and pasting has not worked for me using this tool.

After some digging I found that by editing my rdp files in ~\.tsclient\ and changing the protocol line to:

protocol:i:4

would get the clipboard working on my quick connect entries.

This only works on RDP connections, obviously not VNC ones, but it is very handy.

Thursday, December 18, 2008

How To Display Internet Message Headers In Outlook

Sometimes you need to get more infomation on an email than Outlook generally shows.

To Display internet message headers in Outlook 2007:
First open the e-mail (not just view it in preview).
On the "Message" tab, click the little box on the lower right corner of the options group.
This brings up a new window. The headers are in a text box at the bottom.

In Outlook 2003:
Open the e-mail (not just view it in preview).
Select the view menu, options.
This brings up a new window. The headers are in a text box at the bottom.

Easy, no?

Wednesday, December 17, 2008

How To Enable Remote Desktop On A Remote Windows PC

Microsoft apparently has no easy way to set a remote windows machine to enable remote desktop access.

While you can use MMC to do a lot of management of a remote machine, allowing remote dekstop is (I guess) not one of them.

Intelliadmin has the cleverly named utility "Remote Desktop Enabler" to do this job.

And it is free. I have not tested it to enable on Vista but it works for enabling RDP on remote XP boxes. thanks Intelliadmin.

Wednesday, October 01, 2008

Vista - Offer Remote Assistance Shortcut

Since XP, windows has been able to offer and request remote assistance.

Remote assistance allows you to share a desktop, similar to gotomypc, or VNC, to help solve issues, or just see the same thing.

If you are supporting a workstation that on the same network as you, it is an easy free option for remote desktop assistance.

I've setup our domain policy so that all machines are pre-set with remote assistance enabled from any IP in our subnet. This is still secure, because the user must accept any remote assistance connection requests. Without this domain setting, you would have to right click on "my computer" select properties, and then enable remote assistance from the "remote" tab.

The thing about offering or requesting remote assistance that is a pain is that to do so you need to go under the start menu, help, then find offer or request remote assistance. Which sucks if you need to help folks (offer assistance) all the time.

The good news is that under vista, you can create a shortcut direct to the offer assistance tool.

just create a shortcut and put the target as:

%windir%\explorer.exe “hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Unsolicited/Unsolicitedrcui.htm

Then then next time you need to remote a machine, you can then just launch that shortcut, drop in your target's machine name in the client, and away you go.

Tuesday, September 02, 2008

Google Goes Chrome

Today Google released a new web browser into beta

Here is Chrome:

It looks pretty interesting. If you aren't afraid of beta software, you can get it (for Windows only, sorry) here.

Thursday, August 21, 2008

How To Manually Remove A Windows Service

Sometimes when you have a bad software uninstall under windows, you can have services left behind. Since you have already uninstalled the software, how can you remove the service?

Like just about everything else, services are specified in the Windows registry.

To remove a service, go to the start menu, run, and type in regedit, then click ok

Dig down to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

You should see a list of all system services. Find the problem one and delete it.

As always, be sure to have a good backup of the registry first.

Tuesday, June 17, 2008

Reboot XP Via RDP

XP pro and Vista flavors other than home allow for remote access via RDP. In many cases this a good option for working remotely. A remote session to a XP or Vista workstation does have a few slight differences compared to operating the computer directly. One big one is that you don't have the same options for shuting down on the start menu.

A frequent question I get is, how can I reboot a machine via RDP?

This is actually pretty simple. A Ctrl + Alt + End functions the same in a remote session as a Ctrl + Alt + Delete does on a local session. For an XP Domain member this brings up the "windows security" window, and for a XP stand alone you will get the task manager. From there you can choose shutdown, and then reboot.

Thursday, May 29, 2008

How To Make Windows Report To A Syslog Server

For years I've had my windows server report to a syslog server, rather than logging in to them to check events.

Currently I'm using Syslog-NG with PHP-Syslog-NG as my syslog server. But if you don't want to muck around with Linux, you could use the excellent (and free of charge for a limited version) Kiwi Syslog Daemon.

To get your servers to report all events to the syslog server, you can use the event to syslog service, which was developed by Perdue University's Curtis Smith. Who has allowed this to be used at no charge.

Thursday, May 22, 2008

Tracking Down A Rogue IP Addresss In Windows

I had to track down a rogue IP today, and so I thought I should record the process.

First off, what happened? I had a user who lost connectivity a few times this morning - a reboot cleared it up for them. After investigating a bit, we found that they were getting a conflicting IP error.

I Checked our DHCP server, and found that, yes, the user did have the lease for that IP, and there were not any other for that IP in the system.

So I excluded that IP, in DHCP, and released and renewed her via IPconfig. She got a new IP and was off an running.

Now, I had to figure out what the "Rogue IP" was. I had visions of shenanigans from staff - like someone bringing in their own wireless router, or setting up some server.

I was able to ping that IP address, so I knew at least it was not just there intermittently.

First I used Radmin Advanced Port Scanner on the IP to try to learn some more about it. Only port 80 (http) showed as being open. So I tried to connect to it with a web browser. No luck.

Since I had pinged the address, I was able to use this command:

arp -a


In windows, arp displays the IP to physical address translation tables. In short, if you use arp with a -a argument, it will show you all the IPs you have touched on your system, with the MAC address.

So, now that I had the MAC, I could attempt to figure out what the device that has this IP is.

At this point I could have used this site to figure out what the device is, or gotten into my switches and figured out which port connected to that IP. But I didn't need to do either of those. I recognized the MAC as belonging to one of our VOIP phones.

Then it was simple for me to go into our VOIP system, and figure which phone it actually was. Our phones have a tendency to get locked up, and stop responding. It turns out one of our phones had done that, was still using its IP, but had not responded to our DHCP server in a timely fashion, and the lease had been recycled, and the IP given to the user who had the original problem.

Resetting the phone cleared its issue, and now all is well. If you ever follow this procedure, don't forget to un-exclude the problem IP in DHCP when you get it all resolved.

Wednesday, April 02, 2008

Remote Desktop Client To Console - BROKEN in RDC 6.1

As I have written before, it is possible to connect to the console on a windows 2003 server using remote desktop and the /console switch.

This doesn't work now in version 6.1 of remote desktop client (which you apparently get with Vista service pack 1).

But you now have an /admin switch which does the same thing.

More detail on this can be found here, but the bottom line is that Microsoft has changed the console behavior in 2008 server, and also changed the RDC client to be in line with it.

Tuesday, March 18, 2008

Update on Gparted live

I just figured out (DUH) that the Gparted Live CD that I recently wrote about can not only resize partitions, but it can also copy partitions. So this disk turns out to be an even better too to upgrade a hard disk in a PC.

You could, for example, put a new hard disk in a usb caddy, hook it up to your computer, boot the live cd, copy AND resize the partition in one operation, set the 'boot' flag on your new disk's partition, and then physically swap the disks. A windows partition will then run a scan disk on boot, but you should be good to go with a new bigger hard disk after that.


Even more good stuff!

Monday, March 10, 2008

Clonezilla FOSS For Partition / Computer Cloning

If you are familiar with Symantec Ghost, then you already know what Clonezilla can do for you.

Ghost is a partition copying utility for windows. It geared toward making and restoring complete copies of individual system's hard disks. There is an open-source alternative called Partimage. Symantec also offers a corporate edition designed to use for cloning multiple machines out over a network. This is exactly what Clonezilla does for free - and it is open source.

Ghost has a nice GUI, and a nice polished package. Clonezilla is all text (but menu driven), and harder to use. But it also has many more options, and supports more file systems - such as the kind typically used by Linux.

By itself, Clonezilla requires a server backend. Setting this up is probably more work than it is worth for most small/medium business IT folks. However there is an excellent Clonezilla Live disk, which runs all by itself. I use Clonezilla live for almost all my partition work. Clonezilla actually uses several open-source utilities (including Partimage), so It can copy and restore partitions to/from external usb disks, firewire disk, smb (windows) shares, just about anything you can think of. You can copy the partitions directly, or to archived images. It is the all in one partition toolkit, except for resizing that is.

I use Clonezilla Live to image multiple machines each week, sometimes up to 20 at a time. On the Clonezilla Live site, they warn that if you are imaging multiple machines, you should use Clonezilla with its DRBL server. From what I've seen, for my needs, Clonzilla Live's performance has been more than adequate.

Monday, February 18, 2008

Resize Partitions

For quite a while now I've been using BootNG's demo disk to resize NTFS partions.

It comes at no cost, and works pretty well.

But I recently discovered that there is a GParted Live CD which can both boot your machine, and run the same GParted that you run in Linux.

Why would I choose one over the other? Well, first I had to go find Gparted Live CD, because BootNG would not work on a Dell D620 I was working with the other day. Second, GParted will handle almost any type of partition you can think of for a PC.

And it is completely open source, released under the GPL which is great because you don't need to worry about some comercial entity deciding to pull the plug on their free product. (you only need to worry about the project dying off!)

SOLD


update - this thing does even more!




Friday, January 25, 2008

How To Setup A Second Hard Disk In Ubuntu

This is going to be quick and to the point. I'm not going to drone on about all the different options, and what they might do for you. I will only try to get that second hard disk running ASAP.

I'm assuming you know how to physically install the drive - if not, read the instructions that came with the hard disk. Be aware that any hard disk MUST show up in your system's BIOS before it will work in any OS. So if you are not seeing the drive in OS, check to see if you can see it in BIOS, and also make sure you don't have the SATA connector disabled or anything.

Once installed, boot your computer. if you don't have gparted (system menu, administration, partition editor), go to synaptic and get it.

Launch gparted either by going to system menu, administration, partition editor, or by running "sudo gparted" in the terminal.


See the dropdown box in the upper right side? Select your new disk there.

If you don't understand what a partition is, you probably need to do some more reading, and should probably stop here. But I will plow ahead...

If there is an existing partition on the drive, you can delete it from here if you like. You can also create a new partition as needed. I would suggest ext3, and apparently so would Ubuntu - when your Ubuntu setup ran, it most likely created an ext3 partition for itself to live in.

MAKE NOTE OF YOUR NEW PARTITION'S PATH (/dev/sdb1 in the example I'm using) you will need this info later

Now we have a usable drive. but it won't do much for you without mounting it.

Let's say we want to call our new drive "storage"

go to terminal, and enter the following:

sudo mkdir /media/storage
followed by
sudo chmod -R 2777 /media/storage

Of course change the word storage to whatever you want to call your drive - but make a note of it, you will be using this path again soon.

This has created a mount point for our drive. I chose to put it in the media folder, because Ubuntu will load all removable media (like usb drives) there. You could put this wherever you like, and there is a mnt directory that might actually be a more proper choice. if you care, you can read about it here.

now you need to edit your fstab so that this mounts automatically.

In terminal again:

sudo gedit /etc/fstab

you will need to add a line:

/dev/sdb1 /media/storage ext3 defaults 0 0

***Note - you need to have the path of the partition and the mount point match what you found/used earlier in this tutorial***

Save and exit the editor.


When you reboot next, you will have the disk ready to rock.
Can't wait for a reboot? try this in terminal:

sudo mount -a

!!!BONUS!!!
If you looked closely at my screen shot of gparted, you may have noticed that I have a windows partition on my main hard disk. Well, you should mind your own damn business. BUT yes I do have a dual boot system. If you also dual-boot ext2 IFS can be installed in windows to give access to ext3 filesystems. And now your new drive can be accessed from both of the operating systems on your machine.

Friday, November 09, 2007

Ubuntu Tracker with SMB shares

If there is one thing that I've struggled with since I switched my desktop to Ubuntu, it is searching the system. I just don't get why I can't just Ctrl + F to search for files the way I did in windows.

So I've been using tracker, which is nice, except that I don't index my entire hard disk, because I don't want to drag it down that much. I only index my home folder. I've been wanting to index my samba shares on my freenas server, but I was having trouble doing it. So I figure this method out - it isn't necessarily pretty, or clever, or even really much of an idea, but it works for me.

First, setup the the smb share to mount on logon (these instructions came from here)

To start, I created the directory /media/NAS
(for my NAS server)

Next I created the file /.smbpasswd in my home folder:

"Create a file in your home directory named .smbpasswd (the period at the start of the filename makes it a hidden file). Modifify the permissions on the file so only you have permission to read and write to it. The only thing in the file is your Windows username and password. Here's the commands you would enter to create the credentials file:
Code:
cd
echo username=mywindowsusername > .smbpasswd
echo password=mywindowspassword >> .smbpasswd
chmod 600 .smbpasswd
Substitute your Windows username and password in the commands. No one else except root would be able to read the contents of this file." (again from here)


Then, I set my smb share to be mounted on boot by adding the following line to my /etc/fstab file:

//nas/share /media/NAS smbfs credentials=/home/(USERNAME HERE)/.smbpasswd,uid=(USERNAME HERE),gid=users 0 0

Now, upon boot, "NAS" behaves like a hard disk attached to the system.

The second part is to get Tracker to index NAS. this is simple - go under the system menu, preferences menu, indexing preferences, choose the files tab, and add the /media/NAS locations you want indexed.

***UPDATE***
if you are getting CIFS errors on shutdown, see this.

Monday, October 08, 2007

VMRC plus

If you have the privilege of managing Microsoft Virtual Server you may already know about VMRC plus. BUT I didn't until today, so I thought I would post about it.

You see, I've been stuck connecting via IE (which is done by using the URL - http://servername:1024) which is fine, except for two things. First, you have to use IE, and second it spreads out all of your servers across multiple pages.


So, as I said, today I found out about VMRC plus. (turns out it has only been available for a few months, so I don't feel too bad about not knowing about it.)


VMRC plus is great for me because it allows puts all the info you need in a nice compact form. But that isn't its only great feature. VMRC plus allows you to directly configure or setup virtual servers, as well as remote control them. It's a nice little utility. You can download VMRC plus here.

Monday, October 01, 2007

Useful Windows variables

Since I did not post much last month, here are some useful Windows variables:

VariableTypeDescription

%ALLUSERSPROFILE%

Local

Returns the location of the All Users Profile.

%APPDATA%

Local

Returns the location where applications store data by default.

%CD%

Local

Returns the current directory string.

%CMDCMDLINE%

Local

Returns the exact command line used to start the current Cmd.exe.

%CMDEXTVERSION%

System

Returns the version number of the current Command Processor Extensions.

%COMPUTERNAME%

System

Returns the name of the computer.

%COMSPEC%

System

Returns the exact path to the command shell executable.

%DATE%

System

Returns the current date. Uses the same format as the date /t command. Generated by Cmd.exe. For more information about the date command, see Date

%ERRORLEVEL%

System

Returns the error code of the most recently used command. A non zero value usually indicates an error.

%HOMEDRIVE%

System

Returns which local workstation drive letter is connected to the user's home directory. Set based on the value of the home directory. The user's home directory is specified in Local Users and Groups.

%HOMEPATH%

System

Returns the full path of the user's home directory. Set based on the value of the home directory. The user's home directory is specified in Local Users and Groups.

%HOMESHARE%

System

Returns the network path to the user's shared home directory. Set based on the value of the home directory. The user's home directory is specified in Local Users and Groups.

%LOGONSEVER%

Local

Returns the name of the domain controller that validated the current logon session.

%NUMBER_OF_PROCESSORS%

System

Specifies the number of processors installed on the computer.

%OS%

System

Returns the operating system name. Windows 2000 displays the operating system as Windows_NT.

%PATH%

System

Specifies the search path for executable files.

%PATHEXT%

System

Returns a list of the file extensions that the operating system considers to be executable.

%PROCESSOR_ARCHITECTURE%

System

Returns the chip architecture of the processor. Values: x86, IA64.

%PROCESSOR_IDENTIFIER%

System

Returns a description of the processor.

%PROCESSOR_LEVEL%

System

Returns the model number of the processor installed on the computer.

%PROCESSOR_REVISION%

System

Returns the revision number of the processor.

%PROMPT%

Local

Returns the command prompt settings for the current interpreter. Generated by Cmd.exe.

%RANDOM%

System

Returns a random decimal number between 0 and 32767. Generated by Cmd.exe.

%SYSTEMDRIVE%

System

Returns the drive containing the Windows XP root directory (that is, the system root).

%SYSTEMROOT%

System

Returns the location of the Windows XP root directory.

%TEMP% and %TMP%

System and User

Returns the default temporary directories that are used by applications available to users who are currently logged on. Some applications require TEMP and others require TMP.

%TIME%

System

Returns the current time. Uses the same format as the time /t command. Generated by Cmd.exe. For more information about the time command, see Time

%USERDOMAIN%

Local

Returns the name of the domain that contains the user's account.

%USERNAME%

Local

Returns the name of the user who is currently logged on.

%USERPROFILE%

Local

Returns the location of the profile for the current user.

%WINDIR%

System

Returns the location of the operating system directory.



(found in this command shell overview from Microsoft)

Remote Desktop direct to console

Let's pretend you have access to a Windows server via Remote Desktop (RDP)
Now let's pretend that you use Remote Desktop sessions to manage your servers.

Now let's pretend that while RDP is great, you still need to do certain things while sitting in front of the machine, actually logged on to the 'console'.

Why would you need to do that? Perhaps you recently upgraded your 64bit windows 2003 server to service pack 2, and now your retrospect software will not run in an RDP session, even though you applied the 'fix' suggested by their crappy support site. Just for instance...

Well, the good news is that it is possible to connect to the console session on a windows 2003 server over RDP. AND (here is the good part) it works from pretty much any RDP client, including the linux one I use in ubuntu.

To have the linux client do this, when connecting, just go to the performance tab, and click the check for "attach to console" - and if you save the session as an rdp file, it will remember this setting.

For windows, you have several options, you can call the RDP client from the command line:
"mstsc /console"

(if you want to know more about the command line switches available, just run "mstsc / ?")


OR, when you launch your rdp client, you can put "/console" following the name.


The bonus of doing this is that connecting to the console does NOT count as 1 of the 2 allowed terminal server connections (you only get 2 when running terminal services in admin mode). So if some thoughtless person (possibly you) has filled the connections up, you still get on with this method. Good times!

UPDATE RDC 6.1 has changed this behavior. now an /admin switch will connect to the console of a 2003 server.

Thursday, June 07, 2007

Payback?

I have been wondering what my next entry should be about for a few days now. I was kicking around the idea of talking about being half way through my Ubuntu challenge. To sum up, its been going really well, and I've been feeling really great about Ubuntu, and Linux in general. So great that I'm pretty sure I'll be sticking with it for the long run.

And as I've mentioned before, I have been running Linux based servers for years, and my home server actually runs (or should I say ran) SME server.

Well, the universe saw that I was loving Linux, and decided to put me in my place. My home server crapped out on me last Sunday. It was giving me some issues connecting to a file, so I rebooted it, and when it tried to start up, it gave me a Grub loading Stage 1.5 - Grub error 25.

Ouch.

This should not really have been a big deal, as I've been looking to replace this box with one running FreeNAS - which by the way is an excellent option for small network file sharing. SME server is a good solution for a small business, but it is overkill for my needs. Plus since it has a really cool/unusual way of running its configuration in a database, it is a lot different than most Linux distros. This configuration is great, if you only want to run SME server, but it can get more problematic if you want it to do different things.

So either I needed a server that I could really screw around with to learn with, or something really simple. The problem for me was that I really only needed file sharing. I have steadily removed every other function from this server, and now only need the file sharing. So SME was too much on one side, but not enough on the other. Plus the hard disk was loud in that box. So I was ready to move off of the SME server, and onto FreeNAS.

The only problem was this - I did not have a current backup.

Its Ironic, that within the last month I purchased and implemented over five thousand dollars worth of backup hardware and software in my office. Just to get the backups there to a level I was comfortable with, and I wasn't even making backups of my home setup.

Its the classic case of the cobbler's kids needing new shoes.

I guess I'm not a complete idiot - I have made weekly backups of my server data (the only data that matters on my home network) for years to my workstation. With the idea of putting occasional copies of that backup in my safe deposit box.

Weeeellllllllll,

I had to chuck the workstation backups to make room for...

(wait for it)

my new Ubuntu install.

So, I had a non booting server, with no backup (for the last 6 months), and only the hope that I could fix it. My wife even gave me the "you told me to put things on the server, because they were supposed to be backed up" speech. This was bad.

But again, I figured I only needed the data, one way or another. And I figured it would be no big deal to get to it (or at least most of it), as I've been through more than my share of situations like this before. This disk appeared to be accessible, and so I figured it might be in the process of failing, but wasn't gone yet. I figured I would be able to at least get a good portion of the data.

So I put the disk in an external USB caddy, and tried to access it via my Ubuntu - no luck - the file systems were showing as Linux Raid Partition, and would not mount. This was really strange to me as I did not have any other drives in the system, so I wouldn't have set the server up with software raid - but maybe that is just how SME server works, or maybe I made a mistake somewhere along the way. I really did not investigate that too much - I chalked it up to SME being what it is; Linux, but with its own unique way of doing things. Either that or me screwing something up in the 3 years I've run the thing.

OK - whatever. so I tried to run fsck to fix it - but it did not like the file system type.

a few hours of machinations later (trying to trick the sytem into mounting it - running SME rescue mode, etc.), I ended up booting into Knoppix, using cfdisk to change the partition types to 83 (linux). At this point I was still getting some cryptic errors when trying to run fsck. something about how the magic block was wrong - I didn't take notes during this whole mess - but I was able to follow the instructions to run fsck on the boot partition of SME - the data partition would not work following the same procedure - but it was enough. the system then booted SME Server.

Of course I immediately pulled all my data off, and now have re-implemented a backup schedule at home. Luckily I got all my data back. I'm now running happily on FreeNAS

But let that be a lesson - never get too happy with anything in the computer world, and always make backups.




(I should add that this is not a condemnation of SME Server - its a condemnation of my stupidity. SME Server is a fantastic distro, and I think one of the best options for a small business - be sure to check it out here and here)


Friday, April 27, 2007

D-Link DI-624M

Let me start by saying that I LIKE D-Link products (in general). I have several of their DWL-7100AP in place at the office as WAPs using PEAP. And they are VERY solid.

So when I saw a sale/rebate offer from CompUSA on D-Link's DI-624M SuperG router, I was jazzed. You see, I have a Netgear WGR-614v3 at home, and it has been hanging up every few days, requiring power cycle to clear. So needless to say, I figured I was due for a replacement, and twenty bones PLUS what I thought would be D-Link's solid equipment EQUALS Jim purchasing it.

So I picked one up ($59 bucks pre-rebates) and got cranking on it. Rather than actually try to write it out in an interesting fashion, I'll simply enumerate what went down:

Plug in unit - run through wizard.
upon reboot - it never comes back (solid yellow status light).
pull power - wait standard slow 10 count - replug.
it does not come back - start to worry.
pull power for 5 minutes - it comes back.
figure it might need new firmware - upgrade to newest firmware - reboot.
it does not come back. do the 5 minute wait again. it comes back.
Firware load has wiped settings. Reload - uh-oh it needs a reboot again - it does not come back.
do the 5 minute cool-down-dance. It comes back.

The unit now functions as an wired router, and it only took me 45 minutes - fantastic.

OK, now lets setup the wireless.



NO WPA-PSK setup will allow any devices to connect to the unit. I have literally dozens of different computers/PDAs/Wiis at my disposal, and I could not get ANY of them to connect with WPA-PSK.

Fine

This unit is a turd - return it. get replacement.

this one did not give me any of the problems with the reboots. HOWEVER I still had the exact same WPA-PSK issues. OK I'm done.

thank goodness CompUSA has a nice return policy. Although I didn't really appreciate the highschooler/sales associate trying to educate me on how these devices work. Regardless, I returned the second one.

I picked up a WGR-614v7 for 40 bucks (no rebates) and all is well now.

During the first DI-624M I put in a support request on the D-Link site. Their response was quick, but boiler-plate - meaning it did not answer my questions, but gave me the stock answers they give to grandmothers who can't configure their new inter-watcha-callit.

I'm just wondering if this is a known issue with this product, or If I just had bad luck...