Operating Systems

VirtualBox: VMDK and VDI conversion and resize

0

Since VirtualBox 4.0 it is possible to resize vdi disk images, that is quit simple using the following command:

VBoxManage modifyhd YOUR_HARD_DISK.vdi --resize SIZE_IN_MB

SIZE_IN_MB reflects the new disk size so if you want to increase your image to 25GB, just use:

VBoxManage modifyhd darwin.vdi --resize 25000

Sometimes it happens that you do not use a vdi with VirutalBox, but a VMWare Image (VMDK). That is also no problem, to convert from VMDK to VDI you can use:

VBoxManage clonehd –format vdi /path/to/original.vmdk /path/to/converted.vdi

4 months ago

Steve Jobs 1955-2011

I was completely shocked when I read this morning on my iPhone that Steve passed away. All my thoughts and sympathy goes out to his family and friends. Please be strong and accept the condolences of me and my family.

This day in my life is dedicated to Steve Jobs, I will think of him as of the great man he was and the one person who changed and influenced my life the most. Every single piece of software I write, every graphical user interface I create has a touch of his visions and so he will live on in me, till my time comes to meet him in another place.

I will miss you – Take care where ever you are,
Sascha Müllner

ISPConfig3: Mail aliases for login to Dovecot

0

If you knew ISPConfig2 you probably remember the user login approach which was done there:

Login: web23p2
Password: OurBrilliant Password

Now with ISPConfig3 this has changed to the better by using the users email address – sounds cool – it is!
But what about migration from ispconfig 2 to ispconfig 3 – you do not want to drive around and setup every user account again – or send emails and then the user fails to set it up.

To prevent that you can just add an alias column to the mail user table

ALTER TABLE `mail_user` MODIFY COLUMN `alias` varchar(255) NOT NULL DEFAULT '' AFTER `email`;

Then just fill it with the old logins like webXpX using phpMyAdmin, Sequel Pro or even the console.

If you are done with that, just login to your server and change the dovecot sql config file:

nano /etc/dovecot/dovecot-sql.conf

by changing the user and password queries:

password_query = SELECT password FROM mail_user WHERE (email = '%u' OR alias = '%u') AND disable%Ls = 'n'

user_query = SELECT email as user, maildir as home, CONCAT(maildir, '/Maildir') as mail, uid, gid, CONCAT('maildir:storage=', quota) AS quota, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (email = '%u' OR alias = '%u') AND disable%Ls = 'n'

I will update this post when I figure out the postfix stuff…

You are done – hope that this saved your weekend ;)

Mac OS X: Ever wanted to integrate your Macs in a Active Directory environment with Two-factor authentication (Part 1)?

0

Simple AD Integration using knowledge as authentication key, is for some data to protect not enough. So if you want to raise the bar you add ownership (Smartcard, USB Dongle, e.g.) to the knowledge only authentication system.

So first stone on your way if you use Snow Leopard, you have to be aware that the Directory Utility has been moved from the Utility folder to Core Services. /System/Library/CoreServices/

Then you might want to enable the smart card login feature of Mac OS X using Apple’s nice walk-trough

http://support.apple.com/kb/TA24244

If can not get you Smart Card based solution running using Apple’s on board tools, you might consider using Centrify’s active directory Implementation:

http://www.centrify.com/directcontrol/mac_os_x.asp

If you are still unsure what you really need, there is a very good post about alternative authentication methods for Mac OS X from Ryan Faas @peachpit

http://www.peachpit.com/articles/article.aspx?p=725691

Of course you might ran in some problems and traps, to prevent you from going wild, there are some ongoing discussions at the Apple Boards:

http://discussions.apple.com/thread.jspa?threadID=2131654&start=30&tstart=15

Terminal: Search and Replace text in all files in a folder and its subfolders

0

I just stumbled across a neat idea using perl to replace the content in files

To replace all occurances of a string:

find ./ -name “*.txt” | xargs perl -pi -e ‘s/stringtoreplace/replacementstring/g’

for every of these examples you can also use sed

find ./ -name “*.txt” | xargs sed -i ‘s/stringtoreplace/replacementstring/’

or rpl

rpl stringtoreplace “replacementstring” ./

or numeros other solutions …

To replace the first occurance:
find /your/home/dir -name “*.txt” | xargs perl -pi -e ‘s/stringtoreplace/replacementstring/’

To replace all files in a folder:
for arg in `ls -C1`; do perl -pi -e ‘s/stringtoreplace/replacementstring/g’; done;

you can do more cool tricks using the for shell command as demonstrated above. you can add more specific searches. However, you might be better off just writing a shell script. Here is an example of the first find:
for arg in `find /your/home/dir -name “*.txt”` ; do perl -pi -e ‘s/string/replacement/g’ $arg; done;

Fix Unknown User ACL

0

Log in as an administrator.
Open Terminal (in /Applications/Utilities).
Type the following commands, each on a single line and followed by Return (enter an admin password when prompted):

sudo dscl . create /Groups/username GroupMembership username

sudo dscl . change /Groups/username RecordName username _username

Replace the italicized “username” with your account username (which is also the name of the user’s Home folder, in the Users folder). Remember to include the underscore “_” before your user name in the second command.

If you have more than one account on the computer affected by this issue, you should run these two commands again for each account, substituting with the appropriate user name each time.

This document will be updated as more information becomes available.

Terminal: Dealing with Immutable Files and Folders

0

If you have followed all the advice in the Knowledge Base articles “Mac OS X: About Trash, Deleting Locked Files – Article ID:106272″ and “Mac OS X: Troubleshooting Permissions Issues” and are still unable to empty the Trash, or move an item to the Trash, you may have an immutable flag set on one of the items. The first thing to do is investigate the problem further.

Finding the Problem File(s) or Folder(s)
Open the Terminal program (from /Applications/Utilities). If an item cannot be moved to the Trash make sure it and the Terminal window are simultaneously visible. Then type:

ls -aolR
followed by a space. Do not press return yet. Then drag the offending file into the Terminal window – its full pathname will appear after your typing. Now press return. Alternatively if the offending item is in the trash you can type:
ls -aolR .Trash
ls -aolR /Volumes/*/.Trashes
where the last line is only necessary if you have additional volumes (partitions or extra hard disks).
For each file and folder you will see a line like:

-rwxr-xr-x 1 username staff uchg 0 Sep 17 10:47 filename

Normal files will have a ‘-’ in place of ‘uchg’. The ‘uchg’ indicates the ‘User Immutable flag’. This corresponds to the normal Finder lock on the file or folder and can be cleared by the procedures given in the Knowledge Base Articles, particularly 106272.

Alternatively, since you are already in the Terminal, you can type

sudo chflags -R nouchg .Trash
if the item is in the trash. If it is elsewhere, like on the Desktop, just type
sudo chflags -R nouchg
Do not press return yet. Type a space after that text, then drag the offending file/folder into the Terminal window–the system will fill in the full path name. In either case, supply your admin password when prompted – it will not be echoed, just type it and press return. Then quit Terminal and reboot.
If however you see a line like:

d——— 2 root wheel schg 68 Oct 19 2001 ????????????HFS+ Private Data

then the System Immutable flag is set, and you cannot deal with this from the Terminal, even with root privileges. You must instead use single-user mode to change that flag, as described in the accompanying FAQ, Resetting the System Immutable Flag.

http://www.healthsci.utas.edu.au/trsu/help/immutable.html

Terminal: Secure Terminal.app

0

Some month ago I added a post to heise.de, how to secure the Mac OS X terminal.app. No I found it mentioned on macosxhints.com – wao how amazing the internet is ;)

http://www.macosxhints.com/article.php?story=20060222011953661

Mac OS X: Screensaver crashes – lookupd problem?

0

Seems to be that sometimes lookupd crashes and thus the Mac OS X System becomes unresponsive. This bug is around for years now – funny thing is that I never ever ran into it – but after my girl is now using the system for vb.net development – she ran into it four times.So good thing is there is a fix, as you can see in the explanation for this issue:
Lookupd is the lookup and caching daemon responsible for handling NetInfo, DNS, and other such requests. Applications typically do not access lookupd directly, but rather, use standardized library functions (such as gethostbyname for DNS) which access lookupd on the application’s behalf.Lookupd has a bug (rdar://3632865) in its cache cleanup code that causes it to randomly crash. CrashReporter, the system crash log agent, does not properly handle lookupd crashes, and as a result, when lookupd crashes, the process is not terminated. Since lookupd has not terminated, mach_init does not respawn lookupd. From this point, any application that attempts to access lookupd, either directly or indirectly, will hang.Once lookupd stops responding, it becomes difficult, but not impossible, to recover the system to a usable state. One technique which works, but is not recommended (for obvious reasons), is to leave a root shell running and `killall -9 lookupd` when it becomes obvious that lookupd has died (sudo does not work, since it requires lookupd’s services, as does opening a new terminal window).
Additional informations can be optained, here:http://fivepoundsflax.blogspot.com/2006/11/is-your-lookupd-crashing-its-years-old.html http://dshadow.com/software/unlockupd/The bug number is apparently 3632865 in Apple’s bug-tracking system, “radar”. The rdar url above is usable by Apple folks, only. There’s no way for the public to see the details of that bug number. Joel wrote a little article about this problem as well.
technorati tags:apple, macosx, bug, lookupd

Cyrus database problem

0

After several DB problems after a cyrus update, I pput this information together:
https://bugs.launchpad.net/ubuntu/+source/cyrus-imapd-2.2/+bug/53496
https://launchpad.net/ubuntu/+source/cyrus-imapd-2.2/+bug/67111
http://wiki.bsd-crew.de/index.php/Wiederherstellung_von_Cyrus-IMAPD_nach_Upgrade
https://docs.astro.columbia.edu/ticket/544
http://gradstein.info/HowToRecoverFromCyrus

technorati tags:linux, debian, cyrus, mta

Go to Top