CentOS Helpful Tip

Happy New Year TwentyTen!

How many times have you “forgotten” a root password? Or been given control of a server set up by someone else? Hey it happens.

CentOS Password Reset

At the GRUB Loader, select the installation to reset, press A to append and press ENTER.
You will be presented with a prompt that looks similar to this: grub append> ro root=LABEL=/

Press the SPACEBAR once and type the word single and press ENTER. This will boot to single-user-mode.

You will then get the shell prompt (hostname)#

Change the root password using the normal command: passwd root

Reboot and login. That’s all there is to it!

MySQL errors after installing FOG

Recently, I converted a decently spec’d terminal server into an ESXi server after doing a P2V on the TS. After that, it was time to play. I installed a fresh copy of Ubuntu 9.04 server and then installed FOG. If you don’t know what FOG is, you may want to read FOG’s overview here. Once I got it all installed I kept getting an error when connecting to the web-based management interface. I have pasted in the error and resolution below, including credit on the source of the resolution.

–Himuraken

Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘root’@’localhost’ (using password: NO) in /var/www/fog/management/index.php on line 34
Unable to connect to Database

I am not sure what else to tell you from here, I am at a standstill. Thanks for any help you can offer up.

RE: Problem with mySQL database after install
By: microleaks (microleaksProject AdminAccepting Donations) – 2008-02-06 15:52
All you need to do is go to /var/www/html/fog/commons/config.php and change the mysql password in that file you match whatever you set it as.

Disable Opera’s Torrent Handling

Firefox is a great browser, it really is. But I find that Opera just works better. I know that it isn’t open source, but it just has the features that I want. Plus, anyone that does research owes it to themselves to use Opera.

Although Opera tends to have sane defaults, I find its built in torrent handler to be useless. I poked around numerous places and never figured out a way to disable it. I hadn’t even took the time to Google for a solution. Well this morning I found it and man was it easy.

In your address bar enter in opera:config and press enter. Expand the BitTorrent section and then uncheck Enable. Done.

–Himuraken

Openfiler iSCSI Share For CPS – Update

Original Post: Open Source Technology As Business Solutions: Openfiler – Symantec CPS Destination

We quickly noticed an issue with the iSCSI connector not automatically re-connecting the drive mapping when either the Openfiler server or the CPS server was rebooted. After some troubleshooting and most testing failed to resolve this issue, this project was scrapped in favor of using an Ubuntu NFS share as a backup2disk target.

Next step will be to test an NFS share as a CPS target.

Linux Administration Tool – webmin

For anyone that is not a Linux command-line expert (myself included!) webmin is an invaluable tool. A very quick install of this allows advanced administration from any web browser that can access the IP address of the server. Version 1.480 is the current release. Check it out and you will be pleasently surprised…

Instructions provided here are specifically for Ubuntu but can be adapted for any distro. (thanks to Himuraken for the proper syntax)

1.sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl
2.wget http://prdownloads.sourceforge.net/webadmin/webmin_1.480_all.deb
3.sudo dpkg -i webmin_1.480_all.deb
4: open web browser, point to IP address of server on port 10000

For more info: Webmin

Ubuntu NFS Target for Symantec BE 12.5

Clearly Symantec is NOT open source. The solution to a common data backup problem can be found with open source tools however.

Issue: Backup2Tape provided long backup windows and an unreliable media. Soloution must use open source tools and existing hardware.

Solution: Ubuntu 9.04 (64-bit) NFS share running on Dell 2950 with six Seagate 1.5TB SATA drives in RAID5 configuration. Windows Services for Unix installed on Windows 2003 Server with Symantec Backup Exec 12.5.

NOTE: This will not work without this Symantec command: (verified in BE 11d and 12.5)
bemcmd -o116 -v -f”Name of your backup to disk folder” -e0 -m1 -d\\NFS-Server-Name\export-name

While the backup2disk is running fine, backups of Exchange Storage Groups are currently failing. All other data writes to the NFS share with no errors. Research continues…

Visit Righteous Hack Blog for a complete recap of the project: http://www.righteoushack.net/?p=384

Windows Services for Unix and Backup Exec

Been working on a backup project and needed to use a NFS export as a backup to disk destination in Backup Exec. The best (read free) way to accomplish this is to setup Windows Services for Unix so that your server can map a network drive to the NFS export. Backup Exec does not allow B2D targets to be located on mapped drives but there is a simple work around. Here is the rough break down on what you need to do:

1. Install NFS and export the directory that you want to use as your backup target. Ubuntu users can use the following to install NFS server:

sudo apt-get install nfs-kernel-server nfs-common portmap

Export your directoy however you see fit. I won’t describe the steps necessary to setup /etc/exports as it has been documented numerous times.

2. Download and install Windows Services for Unix 3.5 on your Backup Exec server. You can find that download here. Again, not to be overly redundant, follow the instructions provided on ubuntuforums.org to install SFU 3.5 here. Proceed to step 3 after verifying that you can manually map a network drive to your NFS export and read/write/etc.

3. Create the backup to disk folder in Symantec Backup Exec. In order to create a backup to disk folder on NFS, you must run a simple command. Open up the Windows command line/cmd and make your way over to: c:\program files\symantec\backup exec. Finally, run the following command:
bemcmd -o116 -v -f"Name of your backup to disk folder" -e0 -m1 -d\\NFS-Server-Name\export-name

A fair amount of research and testing went into this setup and the end result was well worth it. We are now using our Ubuntu 9.04 server as a backup to disk target and it is moving some serious IO.

–Himuraken