Moved out of Unity and installed Kubuntu and so got back familiar desktop, etc but on shut down it starts and then hangs. I had this problem with Unity, as well. No problem with earlier version and than upgraded to Unity. Please advise.
After months of attempts to fix this, I've finally found one that works for Kubuntu 11.04 (Natty). The problem is that Kubuntu (and I believe KDE more generally) starts the shutdown process in a way different than Gnome/Ubuntu, so even the dbus / netbase fixes and using autofs that I've seen proposed in different forums all didn't work. I think KDE begins shutting down userspace functions like network manager first before the /etc/init scripts or /home/user/.kde/shutdown scripts are called upon. Just speculation on my part, but that'd be my guess.
But I apparently found the place where Kubuntu actually starts the shutdown process, or close to it - it's in the /usr/bin/starkde script. Immediately after the line saying "echo 'startkde: Shutting down...' 1>&2", I inserted a line saying "sudo umount -t cifs -a -f -l". Then, using visudo as root ("sudo visudo"), I edited the sudoers file to allow the sudo command to execute umount without a password by adding the line (at the bottom of the file) "username ALL=(root) NOPASSWD:/bin/umount". Worked like a charm.
I have a similar problem, but I've noticed it only happens when I'm at the office. Some digging has produced a 4 year old bug in CIFS that causes a 5 minute hang at shutdown when the network is disabled before CIFS mounts can be unmounted.
I'll do some more checking but if you are mounting SAMBA or other shares over a network using CIFS or SMBFS this might be why you can't shutdown properly.
Try running the following command before shutdown to see if it has any effect.
Once I find a reliable way to automate this command I'll post it here
Oops forgot to add links
Also note that I had issues with shutdown earlier this year due to Plymouth not being update correctly (my fault, I copied files as root where I shouldn't have) so if this doesn't solve your problem, give some more detail so we can try and help you out.