hasufell/profile-sync-daemon — pull request #1 by lyzkov (2012-09-23 23:17:05+00:00)
Title: replace su command

If profile-sync-daemon script is used on box with pam_mount annoying password monit occures every `su` command is invoked: `reenter password for pam_mount:`. It several times pauses running the script until user type password in order to mount partition even if it is already mounted. It seems that this is pam_mount [bug](https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/996806).

This solution replaces all `su` with commands using arguments preserving owner and group permissions or `chown`.