Windows Administrator Local Logon Issue

May 16th, 2008

If you get yourself in the unfortunate position of having changed the privileges of Administrator such that you can no longer log in as Administrator either locally or as a service… check this out!

There is a way around, given that you’ve got another Windows machine you can put the hard drive into. Warning: this procedure is not supported by Microsoft, so I can’t promise it won’t damage the system. However, if you’re about to format the disk anyway …

Get the broken drive out of the machine and get it into an enclosure or something. Boot your “working” fix-it machine with the broken drive attached.

First make a backup copy of the contents of \windows\system32\config from the damaged system.

Run regedit, click on HKEY_LOCAL_MACHINE and then select Load Hive from the File Menu. Select the file named “system” from the folder \windows\system32\config on the damaged system. Name the key xxx (or whatever, doesn’t matter really).

Open the xxx key, then the Setup key inside it. Change SetupType to 2. Change CmdLine to cmd.exe. Shut down and boot to the original system. You should get a command window from which it should be possible to run ntrights or gpedit.msc.

Original posting:
http://forums.techarena.in/showpost.php?p=2559349&postcount=5

This definitely just saved the day at work!!!

Quote of the Day

May 15th, 2008

If you’re eating it and its so hot that you’re hating life, then you’ve probably put too much chilli in…

Shift “S” and Mac OS X

February 19th, 2008

One of my friends just chatted me online - the “Shift-S” keyboard sequence wasn’t working.

The “s” key works normally, it works with “Caps Lock, s”, but just not with either of the Shift keys.

I suggested that she unplug and replug the keyboard, and eventually I resigned to even rebooting the Mac.

Turns out that the issue is “Text to Speech” in the Speech System Preference:

This frustrated me also. I could not use the shift s key to get a capital s. Here is how I resolved the issue. It turns out that the s key was set up in the system preferences to speak selected text when the key is pressed. Here are the steps that I took to resolve my problem. Maybe it will help some of the other users.
Open System Preferences.
Click on the Speech icon.
Click the “Text to Speech” tab.
Check to see if the checkbox is checked for “Speak selected text when the key is pressed”.

Speak selected text when the key is pressed

If it is checked that means that a key, in my case the “Shift-s” key was selected. Just uncheck the box and you should have your keys function as normal.

Hope this works for those who seem to have a single key problem.

I found this on the Apple Discussions here.

RHN and Yum Errors - RedHat

January 8th, 2008

If you get a response similar to this:

[root@lxprx025 ~]# yum update
Loading “rhnplugin” plugin
Loading “installonlyn” plugin
Setting up Update Process
Setting up repositories
rhel-i386-server-5 100% |=========================| 1.4 kB 00:00
rhel-i386-server-vt-5 100% |=========================| 1.4 kB 00:00
rhn-tools-rhel-i386-serve 100% |=========================| 1.2 kB 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 1.1 MB 00:06
Traceback (most recent call last):
File “/usr/bin/yum”, line 29, in ?
yummain.main(sys.argv[1:])
File “/usr/share/yum-cli/yummain.py”, line 102, in main
result, resultmsgs = do()
File “/usr/share/yum-cli/cli.py”, line 359, in doCommands
return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
File “/usr/share/yum-cli/yumcommands.py”, line 150, in doCommand
return base.updatePkgs(extcmds)
File “/usr/share/yum-cli/cli.py”, line 628, in updatePkgs
self.doRepoSetup()
File “/usr/share/yum-cli/cli.py”, line 107, in doRepoSetup
self.doSackSetup(thisrepo=thisrepo)
File “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 331, in doSackSetup
self.repos.populateSack(which=repos)
File “/usr/lib/python2.4/site-packages/yum/repos.py”, line 203, in populateSack
sack.populate(repo, with, callback, cacheonly)
File “/usr/lib/python2.4/site-packages/yum/yumRepo.py”, line 88, in populate
xml = repo.getPrimaryXML()
File “/usr/lib/python2.4/site-packages/yum/yumRepo.py”, line 635, in getPrimaryXML
return self.retrieveMD(’primary’)
File “/usr/lib/python2.4/site-packages/yum/yumRepo.py”, line 622, in retrieveMD
cache=self.http_caching == ‘all’)
File “/usr/lib/yum-plugins/rhnplugin.py”, line 209, in _getFile
start, end, copy_local, checkfunc, text, reget, cache)
File “/usr/lib/yum-plugins/rhnplugin.py”, line 298, in _noExceptionWrappingGet
return result
UnboundLocalError: local variable ‘result’ referenced before assignment
[root@lxprx025 ~]#

try running “yum clean all” - this will remove any cached downloads from RHN and will reset any partially downloaded files.

Thanks to the guys at RedHat Technical Support for this great tip!

SSH Agent and Leopard

December 2nd, 2007

Found this neat summary of the problems that stem from using the SSH Agent.app on Mac OS X 10.4 and then upgrading to 10.5.

http://discussions.apple.com/thread.jspa?messageID=5727320

Basically, just check your ~/.MacOSX/environment.plist file and make sure that the SSH_AUTH_SOCK environment is no longer set. Then just log out and log back in again!

MacBook Pro Insomnia

November 5th, 2007

I was just reading one of my favourite hard-core Mac techie blogs from Jonathan ‘Wolf’ Rentzsch and I found this article… hope it helps someone that has issues with their new MacBook Pro (and I suspect it might help 15″ users as well!)

http://rentzsch.com/bugs/curingMacbookPro17Insomnia

All credit goes to Jonathon Rentzsch.

suPHP and Plesk 8

September 12th, 2007

For anyone struggling with getting suPHP and Plesk 8 happening together - I have a solution.

I have found this excellent, although slightly out-dated, article.

While it was pretty much spot on the money, I will add a couple of pointers.

Firstly - the latest RPMs can be downloaded from here. The article points to an older release on RHEL3 - I needed one on RHEL4 and the latest stable version.

Secondly - if you are trying to host something like PickPic (check it out here!), this is most definitely the solution for you.

The guys (and gals I assume) at PickPic have been very helpful… they were adamant that uploading files with 777 permissions was a bad idea and that we should really work towards a better solution. This article… way too many pages deep in a Google search in my opinion… is that solution.

I am just waiting for my hosting customer to check back with PickPic and let me know whether it is all now working for them.  Fingers crossed, prayers said, etc etc!

I am awaiting on a confirmation from the other guy to see if I can reproduce the content of his post here!

How to rebuild software RAID on Mac OS X

September 5th, 2007

Mac OS X: How to rebuild a software RAID mirror

Found this great article on the Apple Knowledge Base… just in case anyone else runs into the same problems.

Enabling WebDAV for Calendaring on Debian

June 12th, 2007

Check out this article I found: http://www.debian-administration.org/articles/285

It is pretty much spot-on the money, except that I had to resort to using Auth Basic with a standard htpasswd file.

I am not sure on the details on that yet - it was a proof of concept for a couple of users. Once I have played around with it a little more, I will probably update this document.

LaunchDaemons and Mac OS X - OpenVPN as an example

April 19th, 2007

LaunchDaemons are the new “init” for Mac OS X 10.4 onward.

I have successfully used it to start and run OpenVPN on Mac OS X 10.4 Server.

Below is the .plist file I created to start and run OpenVPN on Mac OS X 10.4






        Label
        org.openvpn
        OnDemand
        
        Program
        /usr/local/sbin/openvpn
        ProgramArguments
        
                openvpn
                --config
                openvpn.conf
        
        RunAtLoad

        TimeOut
        90
        WorkingDirectory
        /etc/openvpn



Once you have created the .plist file, you are ready to install and configure it with “launchctl”.

Just typing “sudo launchctl” on the command-line will take you into an interactive session with launchd!

Type “help” for instructions and a list of commands.

The following were the most helpful that I found… you can also use them on the command-line like the examples below. Assuming you have put the file about into /Library/LaunchDaemons/org.openvpn.plist, you can do the following:

“sudo launchctl load /Library/LaunchDaemons/org.openvpn.plist” to tell launchd about your new daemon.

“sudo launchctl unload /Library/LaunchDaemons/org.openvpn.plist” to uninstall your daemon.

“sudo launchctl start org.openvpn” to start the daemon.

“sudo launchctl stop org.openvpn” to cause launchd to stop being obsessive about the daemon and let it die.

With the .plist file shown above, launchd automatically restarts OpenVPN when it crashes and the process is no longer running.

Hope that helps someone!