robdc's blog

Ubuntu 9.10 Netbook remix and remote desktop (VNC)

Wow, this really shouldn't have been as hard to find as it was. As anyone trying to set up Ubuntu 9.10 NBR for remote desktop (VNC) noticed, the option has been removed in this edition. Although there are many tutorials online on how to set up a VNC server in ubuntu the easiest option is obviously to turn on the "Remote Desktop" feature that comes bundled with other versions of Ubuntu, yes it is just a VNC server but it has some tweeks and a GUI that make it a better option for some so here's the easiest way of getting that working. The remote desktop package for ubuntu is called vino so either pull up synaptic or do a quick

sudo apt-get install vino

in the command line and you should be all set.

How to get a non Apple NAS to play nice with time machine

If you're like me, you have an assortment of electronics around the house and are constantly rearranging things to do stuff they weren't meant to. So here I sit with an OSX 10.5 machine and no time machine. That didn't seem right. I also happen to have just set up a dlink DNS-321 with 2x500gig drives in raid 1 for backup. Well, on my first attempt, of course, the NAS doesn't even show up on the list of available storage locations for time machine, big surprise there... So my first reaction was to go around it and use something different to get the same result. well SuperDuper looked good and does support everyday NASs but it takes some tinkering, and if I was going to tinker, I was going to get the products working the way they were meant to work which means Time Machine.

First things first, your mac won't list any random NAS it sees until you tweak it a bit, fire up your trusty terminal and enter this:

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

(yes that 1 at the end is important) then hit enter.

now comes the tricky part, even though your mac should now show your NAS (you may need to restart for this to take effect) if you try to select that drive for Time Machine usage you'll get some sort of crazy error.

Next go to your system preferences and select "sharing". What does it say next to "computer name"? If your computers name is blank, has more then 8 characters, has any spaces, or symbols... change it to meet those criteria. Something short and easy is best (we will need this info later so make a note of it).

Now that your computer has a name on the network that Time machine will like, open up the terminal again and type this in:

$ ifconfig en0 | grep ether

and hit enter, the output should be the mac (physical) address of your main network card, when I first set this up, I thought I was being clever by using the mac of my wireless card since that's how this machine connects to the network but it didn't work because Time machine uses your primary network cards mac to identify the machine regardless of the fact that its not being used.

so, now that we have the name and the mac, lets get to making this work.

go to Applications>Utilities>Disk Utility and select "create image" now this part is EXTREMELY important, I can't stress that enough. The name is the most important part here. The name of your image has to be thenameofyourcomputer_themacofyourcomputer
so if your computer is called fido and the mac is 00:1a:2b:3c:4d:5e your image name would look like this:

fido_001a2b3c4d5e

no dashes or colons in there either, and name bothe the 'save as' and 'volume name' this way to be safe.

next you select the size of the image, now the size you choose should be large enough to accommodate all of the stuff you need to back up, but be aware that if you make a 200gig image, it won't take up 200 gigs on the disk until you fill it up because of the type of image we are making.

next select the pull down menu for Image format and select "sparse bundle disk image"
**you cant save the image directly to the NAS, and locally you will need enough free disk space to cover the FULL image, even though the finished product will only take up a couple hundred megs.

once the image is built, unmount it.

now copy it to the NASs root directory.

open up Time Machine and select the NAS and hopefully everything is working for you.

Some people might get an error saying "could not write to file .0061xxxxxxx", if that is your case at this point, the only workaround I've found is installing the fun plug by Fonz, once the steps to install it are taken the root user is unlocked allowing you to go into the NAS and manually grant write privileges to specific users, I don't have time right now to get into the details of that but here's the link to Fonz's info on fun plug:

http://wiki.dns323.info/howto:ffp


If anybody has questions or suggestions, please feel free to comment or send me an email. Happy hunting.

--

Rob

VMWare server 2 (can't connect to webadmin page in Windows)

Well, I always feared this day would come. The, until now, infallible VMWare team has failed me. VMWare server 2 has abandoned the lightweight, useful and intuitive WMWare management console for what? you guessed it, a web interface... And if you are like me you hate it. Also if you are like me, it doesn't work. After installing the new version, what used to be the shortcut to the management console is now a literal shortcut to the address of the webadmin interface in your default browser (https://localhost/ui/#)the problem is when I click on it I get a "could not connect to server" error in both IE and Firefox (2 or 3).

The fix is a little odd, but here's what worked for me using XP sp3:
go to C:/windows/system32/drivers/etc/ and edit the "hosts" file in notepad or the simple text editor of your choice. It's going to have a bunch of commented out info (stuff with a # at the beginning of the line) followed by your local host address. which should read "127.0.0.1 localhost". All I did was add another entry for a machine that was already on my network, which looked like "ipofmachine machinename". for those needing a more literal example the hosts file should look something like this:

# this is a hosts file
# this is more info about the hosts file
# even more info about how its supposed to look
127.0.0.1 localhost
192.xxx.xxx.xxx othermachine

save that, restart and try out the VMWare server shortcut, that fixed it for me.
(this is reported to work in both Vista and XP but I've only tested it in XP)

Custom key mapping in linux (ubuntu)

I did this in Ubuntu for a friend but it should theoretically work in any Debian setup using the X window manager, and would probably translate well into other Linux distros as well. The only info you really need is what keyboard layout you are already using. The setup on the laptop i'm working on is using the US international keyboard layout. The laptop I'm working on has a busted 'a' key and my friend would like to use the capslock key as the a key, but others might find this info useful for other reasons. So here goes.

1. open up a terminal
2. navigate to /etc/X11/xkb/symbols
3. find the keymap that you are using (for me it was "us")
4. open up your favorite text editor and edit the map file, nano is more than good enough for this instance though
5. find the key that you want to change since I was changing the capslock to 'a' I simply did a Control+W (where is?) and searched for 'Caps' which only goes to 2 values in the 'us' key map file, one for us international and one for us DVORAK so I only needed to change the first one which looked something like this like this:

key { [ Caps_Lock, Caps_Lock ] };

and i changed it to:

key { [ a, A ] };

which means when I hit the capslock I get the letter 'a' and if I hold shift and capslock I get 'A'

6. Once that's done a quick Control+o to write out, save the name
7. Control+x to exit nano.

That was a real quick writeup but should be helpful to anyone caught in the same situation.

Whole Disk Encryption in windows (xp and vista) using TrueCrypt


Companies and Universities across the US are requiring that faculty encrypt their hard drives, unfortunately they also aren't providing anyone with much direction on how to do so. This how to should help anyone in the most common scenario of having a laptop with 1 operating system and 1 partition (and only one hard drive) that needs to encrypt their entire disk.

Before getting started you should know 2 things to ensure that whole disk encryption with TrueCrypt goes smoothly

A. know your disk topography... the layout of your hard drives (HDD).
do you have multiple partitions or operating systems on your main OS drive? here is how to check
1. for both xp and vista find "Computer" or "my computer" on the start menu or desktop and right click
it then go to "manage".
2. In the Computer Management window look for "disk management" in the menu on the left. click on it
3. you should see the identifier for you connected HDDs and a map of their layout
4. identify the layout for your OS drive, make a note of it, it will come in handy later.

B. Is your burning software capable of burning images (.iso)?
if not, go to www.imgburn.com and download imgburn, its a free tool for burning image files correctly.

Now on to the TrueCrypt stuff.

1. download truecrypt from their site
2. run installer
3. accept license agreement
4. install or extract (install)
5. options: I suggest leaving all selected other than the adding of links, that is your choice.
X install for all users
X add truecrypt to start menu
add truecrypt to desktop
X associate the .tc file extension with truecrypt
X disable windows paging files
X create system restore point
6. restart, TrueCrypt is now installed.

Encrypting the system drive.

1. open TrueCrypt

2. in the TrueCrypt window go to system> Encrypt System Partition/Drive

3. choose type of system encryption. for most people Normal is enough, and its what I will show here.
(the hidden setting gives you the option of having 2 operating systems that would boot with different
passwords so in a "life or death" case you can appear to be unlocking your computer when in reality you
are unlocking a previously prepared operating system, again unnecessary for most people but an option
just the same)

4. next select the area to encrypt, here you select "Encrypt the whole drive"

5. Encrypt host protected area? for average users select yes. even most drives that come from the factory with
a recovery partition shouldn't use this space, and laptops won't have to worry about RAID data being hidden
there.

6. next TrueCrypt detects hidden sectors, not much for you to do here.

7. next select the number of operating systems on your machine, you should be completely aware if you have more than one. select the environment that best describes your hard drive.I will also stop anyone who has a multiboot setup right here, TrueCrypt does not support encryption of drives with multiple Operating Systems (yet?). Good news is TrueCrypt is multi-platform so you can encrypt each system partition individually, a bit more work but doable.

8. Encryption options: here you can choose from the available encryption algorythms and even stack them on top of eachother, this is a great feature but keep in mind more encryption = slower disk, and cascading encryption algorithms has been known to cause problems at times. you can also test the encryption algorithm and set the hash algorithm.

9. password: be sure to choose a strong password this means using numbers letters (capital and lower case) and symbols, and don't use any words found in the dictionary as common password attacks use word lists as primary tools.

10. Collecting Random Data: move the mouse around the TrueCrypt window to generate random numbers based on the movement, the longer you do this the more random the number.

11. the next window shows you the randomly generated keys, you have no real need to keep these numbers.

12. Rescue disk: Pay attention to where you save the disk image since TrueCrypt won't let you proceed until you insert the properly burnt disk. The file is a disk image (.iso) so you need to burn it as such and not just as data. If you don't have burning software that will let you burn an image, imgburn is a free tool to burn image disks and can be found here: www.imgburn.com.

13. Rescue disk recording: Once you've burnt the disk insert it in your cd drive and hit next.

14. once the disk is varified, eject it and store it in a safe place.

15. Wipe mode: for drives have, at one time had highly sensitive information on them government agencies require DOD complyant wipes of the HDD, this option lets you choose between several levels of such wipes. mainly for the purpose of making recovery of files more dificult for unautherized parties. Everyday users probably don't require any wipe at all.

16. Next is the system encryption pre-test, initiate it and the computer restarts. on restart you will have to enter your password as you will when the HDD is fully enctypted.

17. Pretest completed: hopefully your pretest went off without a hitch and you simply have to hit next to begin encryption. (The process does take a while so expect to wait a few hours depending on HDD size)

Once the process is done you should have a password prompt at boot, if the encrypted boot sector gets messed up you can use the recovery disk you burnt earlier to restore it. The disk also comes in handy when you decrypt a disk and you still get the password prompt, you can use the disk to restore the original boot sector.

Oracle database on XP (loopback and other concerns)

When first installing Oracle database on an XP system, it may, at first, appear as if you've got it good and will have far less problems than your linux counterparts. This is misleading. Although the XP install will undoubtedly be more simple, there are still some hiccups along the way for someone like me who is not happy with the default settings and locations.

The first set of issues I came across where location issues. I didn't want to use the default base and home directories and take up space on my C: drive when I had a spacious 1tb E: drive just ripe for the database-ing. Unclear as to the relation between the base and home directories I put them on the same directory level. Well I'll save you the grief, Oracle didn't like that. So rather than draw out what happened I'll just tell you the couple of unwritten rules I found on my own.
1. home should be a subdirectory of base
2. the names of both the home and base directory should not have any spaces or symbols in them

Neither of these issues will cause catastrophic failures but it's good practice to conform to the preferred settings of the software.

The next issue, on the other hand, will grind your install down to a halt. If you resolve your IP usind DHCP, and you probably do, you will get a big error from the Oracle installer that says something about a Microsoft loopback device. You basically have to give your machine a static IP but in a very specific way that Oracle is going to expect to see to work correctly. Here are some instructions on setting up the Microsoft loopback connection, I got them from http://orabase.blogspot.com/2006/08/loopback-adapters-for-oracle.html, I'll just post them here to save you some time.

1. From the Start menu, select Control Panel.
2. Double-click Add Hardware to start the Add Hardware wizard.
3. On the Welcome screen, click Next.
4. On the Is the hardware connected? screen, select Yes, I have already connected the hardware, and click Next.
5. On the The following hardware is already installed on your computer screen, select Add a new hardware device, and click Next.
6. On the The wizard can help you install other hardware screen, select Install the hardware that I manually select from a list, and click Next.
7. From the list, select the type of hardware you are installing screen, select Network adapters, and click Next.
8. On the Select Network Adapter screen, make the following selections:
* Manufacturer: select Microsoft.
* Network Adapter: select Microsoft Loopback Adapter.
9. Click Next.
10. On the The wizard is ready to install your hardware screen, click Next.
11. On the Completing the Add Hardware Wizard screen, click Finish.
12. If you are using Windows 2003, restart your computer.
13. Right-click My Network Places on the desktop and choose Properties. This displays the Network Connections control panel.
14. Right-click the connection that was just created. This is usually named "Local Area Connection 2". Choose Properties.
15. On the General tab, select Internet Protocol (TCP/IP), and click Properties.
16. In the Properties dialog, do the following:
1. IP Address: Enter a non-routable IP for the loopback adapter. Oracle recommends the following non-routable addresses:
* 192.168.x.x (x is any value between 1 and 255)
* 10.10.10.10
2. Subnet mask: Enter 255.255.255.0.
3. Leave all other fields empty.
4. Click OK.
17. Click OK.
18. Click OK in the Local Area Connection 2 Properties dialog.
19. Restart the computer.
20. Add a line to the C:\windows\system32\drivers\etc\hosts file with the following format, after the localhost line:

IP_address hostname.domainname hostname

where:
* IP_address is the non-routable IP address you entered in step 16.
* hostname is the name of the computer.
* domainname is the name of the domain.

For example:

10.10.10.10 mycomputer.mydomain.com mycomputer

21. Check the network configuration:
1. Open System Properties, and select the Computer Name tab. In Full computer name, make sure you see the hostname and the domain name.
2. Click Change. In Computer name, you should see the hostname, and in Full computer name, you should see the hostname and domain name.
3. Click More. In Primary DNS suffix of this computer, you should see the domain name.

Once you have all those things set up your Oracle database install should go smoothly.

Happy hunting.

Active Directory Authentication on x86_x64 OpenSuse 10.3

Anyone trying to follow my previous directions on an x86_x64 install may have noticed a wrench in the woodwork at step 17... no 64bit samba compiled on the install disk, Fail. So here's what you do:

Run through the whole install normally no special login stuff, make it all @localhost. Just make sure that you name the machine in accordance with the AD entry you made. When the install finishes go into YAST and set up all your online repositories and update everything ESPECIALLY the x32 libraries. Once that's done install samba and samba-client. Then go into the network domain setup in Yast and do all the windows domain steps. If I've been a little vague I apologize as this was a last minute addendum to let x64 users know that there is hope. If anyone needs screenshots or more specific directions, don't be afraid to ask.

Linux Active Directory Authentication using OpenSuse 10.3

1. First off, go into the BIOS and make sure that the system time is correct; this will have a very powerful effect on AD authentication as a difference in more than 20 min from the AD server will cause a “time skew” error and not allow you to connect.

2. Next you have to log into your AD server and create an entry for your new machine. General practice is to keep the name at 15 characters or less and name the machine for its location and/or purpose.

3. now on to the actual setup, insert your OpenSuse boot cd/dvd an boot from it.

4. select “Installation” at the first window

5. Select your preferred language, for the purposes of this guide I have chosen English(US)

6. Now you get the option to check your install media for errors, If it is your first time using this disk it may be a good idea to do so

7. Next you are asked to agree to the license agreement

8. Under Installation Mode, select “new installation” and make sure that the check boxes for “add online repositories” and “include Add-On Products” are unchecked

9. Clock and Time Zone, this is where those early BIOS settings come into play. Make sure the region and time zone are set to correspond with the location of the AD server you will be using to authenticate. Since I am using a local AD server in Gainesville Fl, I selected USA, Eastern time zone, then changed “hardware clock set from “UTC” to “local time” and made sure that the time and date are correct.

10. Next you are asked to select the window manager, Gnome or KDE. This is a personal choice amongst linux users and a matter of great debate so I will leave the choice to you. I selected KDE.

11. Next you are given all the information you have just entered, review it and make sure it is all the way you want it. Then you are given a few more license agreements to accept, then, finally asked if you are sure you want to install. Once you agree to all this, the installation will finally begin. You can click on the details tab to check on the progress of the installation.

12. when its all done the system will reboot.

13. Now you enter a password for the root user and go to the next step.

14. On this step it is very important that the Hostname matches the name assigned to this machine on the AD server (the name we added to gates in the second step). Also make sure that the box next to “Change Hostname via DHCP” is unchecked

15. The next window will have all your network configuration settings. The most important part here is the “network interfaces” section. If it picks up your network card but says “not configured yet” under it, click on the change button at the bottom of the screen and select “network interfaces”, Highlight your network card and click on the configure button at the bottom of the page. Select “Dynamic Address” and “DHCP” from the pulldown menu, then hit next.It should now say “DHCP” under IP Address for your network device. Hit “accept” at the bottom right of the page. The Network Configuration page should now reflect the changes we’ve made and say that your network interface is configured with DHCP.

16. Next you will be asked if you want to perform a network test, for this test to work correctly the machine must have access to outside networks. AD authentication can and will work on a private network that has no access to the web. Be aware of this and use the network test only if it is applicable.

17. The next set of windows is where this process either works or falls apart. User Authentication Method, for AD you are going to select “Windows Domain.” When you hit next it will say that “samba” needs to be installed, hit continue and wait for the samba packages to finish installing.

18. Windows Domain Membership; enter your domain and make sure that the check boxes next to “Create Home Directory on Login” and “offline Authentication” are both checked.

19. Enter your admin username and password when prompted. Also make sure that the dialog box has the correct domain at the top where it says "Enter the username and password for joining the domain (yourdomainhere)"

There are a slew of issues that can come up, the most common of which is simply an incorrect log in. Most errors will come in the form of “NT_STATUS_TYPE_OF_ERROR” and should be pretty informative as to what the issue is. For example an error reading “NT_STATUS_NAME_TOO_LONG” would indicate that the name of the machine is longer than 15 characters. Again keep an eye our for “time skew” errors which would indicate some discrepancy between the time and date on the AD server and your local machine.

20. If there are no errors you should receive a “welcome to the (yourdomainhere) domain” message and be able to finish the install with minimal deviation from standard windows.

21. Upon restart make sure that the domain is set to yourdomain and log in using your user account.

The beginning

Beginning today I will start entering different tutorials and whatnot about technical hardware and software on this site. some may be pretty technical, some other stuff may just be how i got some annoying thing to work, either way hopefully someone else finds some of this stuff useful.

Syndicate content