Monday, April 12, 2010

Re-set Fedora root password

Came across the need to re-set my forgotten root password on my Fedora 11 box. The alarmingly simple solution makes it very evident that physical access to machines is extremely important to safeguard.

I am using GRUB so the trick was to show the choice of kernals it wanted to boot to, choose "e" to edit one of them and add "single" at the end of the kernal boot command, then choose "b" to boot that kernal, it will push you into single mode with root priveleges

type in "passwd" and choose a new root password.

apparently LILO is just as easy; booting with: "linux single" gives you the same result.

Saturday, April 10, 2010

Linux Mint Partition Problem

I came upon this problem installing Linux Mint 8. This is a great looking Linux distribution based on Ubuntu. Definitely would recommend this to users of Windows who want to try a Linux that acts much like Windows

After starting up with the iso disk into the live cd, when you go through the "install mint" wizard, there will be no partitions that show up at the 4th step and you can't continue. Starting the OEM install at the CD boot has the same results.

The trick to getting the partition table to show up is to run this command from the terminal once in the live cd screen:

sudo apt-get remove dmraid

Then run the wizard and the partitions will show up so you can continue.

Thursday, March 25, 2010

Task scheduler issues on Server 2008

Microsoft has changed the task scheduler pretty drastically since windows XP and it is very hard to get used to. I had a recent issue where I couldn’t tell if my .bat file I use for backups had really run – the bat file is supposed to write to 3 separate log files while running so I can view any problems and verify what it did. Well, the task seemed to run however, the log files were not updating. After investigating I found that the following steps should be carefully run through when creating a task in 2008:

• Make sure that the task is set to "configure for Windows Vista or Windows 2008" on the first page of the task properties (under the "general" tab)
Very important when writing to log files --> Make sure that the task is set to "start in" the folder that contains the batch file: open the task properties, click on the "actions" tab, click on the action and then the "edit" button at the bottom. In the "Edit Action" Window there is a field for "start in (optional)" that you set to the path to the batch file.
• Make sure that the task is running as an account that has explicit "Full access" permissions to all these things: The .bat file itself, the folder containing the .bat file, and the target files/folders that are affected by the .bat script.
• Make sure that the account running the task is a member of the local "administrators" group for this machine
• Make sure that the task is set to "run whether logged on or not"

Thursday, January 28, 2010

Delete hiberfil.sys hibernation file in Vista

File is as large as your physical memory which is very large.
Can easily do this is in XP by disabling hibernation however Vista it is more difficult. Do it via command line: powercfg -h off

Wednesday, January 27, 2010

batch file to backup and encrypt to disk

There are times when backing up files to a USB drive is the only method that a client has chosen to perform their backups on their Windows machines. The best way to ensure that that USB is not stolen or lost, and then read, is to encrypt the files. Anyone who knows me knows that I love creating my own scripts and using open software to avoid high priced vendor solutions. Here is a quick process to give the backups some decent security.

Download and install Truecrypt (Excellent open source on-the-fly encryption tool).
Create encrypted volume inside USB (call it "backups" for this exercise)
Make sure you use strong password and remember it or keep it somewhere you can access it again
Download Robocopy (or Rsync)
Batch script:

"c:\program files\truecrypt\truecrypt.exe" /q /s /v e:\backups /lj /a /p password
robocopy C:\Users\Administrator\Documents j:\ *.doc
"c:\program files\truecrypt\truecrypt.exe" /q /dj

(here I create volume j, using weak password called "password" silent mode, don't show GUI, automount volume, then call robocopy to do the backup of .doc files in the Documents directory to the encrypted volume, then unmount volume)

There you have it, a USB thumbdrive with your encrypted files out of view.

Wednesday, January 13, 2010

Cannot copy file access is denied windows XP

Came across this one today; bought 4 new Dell computers and was setting them up. Ok first thing I have to do is copy a directory over from the old computer to thenew machine, half way through the copy and I get cannot copy access is denied.
I try everything, I disable file sharing, turn off firewall and a few other things. I notice that at every reboot Norton asks me to sign up for their trial. Being a new computer and I won't be using it, I just click on "remind me later". Well, could it possibly be Norton stopping this file (I notice it is a .exe file); this could be possible but why since I have told it I don't want to install it.
So I click to uninstall Norton trial offer (which I never accepted) and now everything works. I guess I don't know why Dell puts this on yet it indicates that it is not installed and you have the option to install it when you want. I guess this is incorrect.