Tuesday, July 19, 2011

Windows XP Audit mode

Maybe a bit late ….

Windows 7 offers a very handy feature called the Audit Mode. I’ve blogged about that before. This enables you to prepare the computer for the end-user, therefore it skips the whole OOBE (Out Of Box Experience) and the creation of local user accounts.
Windows XP does not have that feature so on the end of a fresh installation of Windows XP you’ll be prompted to create a user account and Windows will then automatically log in with that account. Microsoft doesn’t allow you to skip this, so you will always have to create a second local account (besides the Administrator account).

I recently found out a way to bypass this. Ok, resetting the machine does the trick also. But a more friendly way is to type SYSTEM in the first field.

Thursday, July 14, 2011

rsync with ssh on a different port (and sudo)

If you want to rsync data from/to a remote server with ssh, you could do something like this:

rsync -av myusername@* /storage/monday/

But what if ssh listens on port 2222?

rsync -av --rsh='ssh -p2222' myusername@* /storage/monday/

But what if you need sudo permissions?
Server-side configuration (/etc/sudoers)

#sudo access for myusername running rsync backup
myusername ALL=NOPASSWD:/usr/bin/rsync


rsync -av --rsh='ssh -p2222' --rsync-path="sudo rsync" myusername@* /storage/monday/ .

And in case you want to include multiple directories:

rsync -av --rsh='ssh -p2222' --rsync-path="sudo rsync" myusername@{/backup,/root,/etc} /storage/monday/