Index: /trunk/src/VBox/Installer/common/unattended_templates/debian_preseed.cfg
===================================================================
--- /trunk/src/VBox/Installer/common/unattended_templates/debian_preseed.cfg	(revision 67881)
+++ /trunk/src/VBox/Installer/common/unattended_templates/debian_preseed.cfg	(revision 67882)
@@ -39,11 +39,11 @@
 
 # Users
-d-i passwd/user-fullname string VBox user
-[change]d-i passwd/username string $user
-[change]d-i passwd/user-password password $password
-[change]d-i passwd/user-password-again password $password
+d-i passwd/user-fullname string @@VBOX_INSERT_USER_FULL_NAME@@
+d-i passwd/username string @@VBOX_INSERT_USER_LOGIN@@
+d-i passwd/user-password password @@VBOX_INSERT_USER_PASSWORD@@
+d-i passwd/user-password-again password @@VBOX_INSERT_USER_PASSWORD@@
 d-i passwd/root-login boolean true
-[change]d-i passwd/root-password password $password
-[change]d-i passwd/root-password-again password $password
+d-i passwd/root-password password @@VBOX_INSERT_ROOT_PASSWORD@@
+d-i passwd/root-password-again password @@VBOX_INSERT_ROOT_PASSWORD@@
 d-i user-setup/allow-password-weak boolean true
 d-i passwd/user-default-groups string admin
@@ -69,12 +69,12 @@
 echo 'apt-get -y install build-essential' >> post-install.sh; \
 echo 'apt-get -y install linux-headers-$(uname -r)' >> post-install.sh; \
-echo 'mkdir /mnt/cdrom' >> post-install.sh; \
+@@VBOX_COND_IS_INSTALLING_ADDITIONS@@echo 'mkdir /mnt/cdrom' >> post-install.sh; \
 echo 'echo' >> post-install.sh; \
 echo 'echo "Installing VirtualBox Guest Additions..."' >> post-install.sh; \
 echo 'mount -t iso9660 -o ro /dev/sr1 /mnt/cdrom' >> post-install.sh; \
 echo 'bash /mnt/cdrom/VBoxLinuxAdditions.run' >> post-install.sh; \
+echo 'usermod -a -G vboxsf @@VBOX_INSERT_USER_LOGIN@@' >> post-install.sh; \
 echo 'eject /dev/sr0' >> post-install.sh; \
-[change]echo 'usermod -a -G vboxsf $user' >> post-install.sh; \
-echo 'exit 0' >> post-install.sh; \
+@@VBOX_COND_END@@echo 'exit 0' >> post-install.sh; \
 chroot /target chmod +x /postinstall/post-install.sh; \
 chroot /target /bin/bash /postinstall/post-install.sh
Index: /trunk/src/VBox/Installer/common/unattended_templates/ubuntu_preseed.cfg
===================================================================
--- /trunk/src/VBox/Installer/common/unattended_templates/ubuntu_preseed.cfg	(revision 67881)
+++ /trunk/src/VBox/Installer/common/unattended_templates/ubuntu_preseed.cfg	(revision 67882)
@@ -39,11 +39,11 @@
 
 # Users
-d-i passwd/user-fullname string VBox user
-[change]d-i passwd/username string $user
-[change]d-i passwd/user-password password $password
-[change]d-i passwd/user-password-again password $password
+d-i passwd/user-fullname string @@VBOX_INSERT_USER_FULL_NAME@@
+d-i passwd/username string @@VBOX_INSERT_USER_LOGIN@@
+d-i passwd/user-password password @@VBOX_INSERT_USER_PASSWORD@@
+d-i passwd/user-password-again password @@VBOX_INSERT_USER_PASSWORD@@
 d-i passwd/root-login boolean true
-[change]d-i passwd/root-password password $password
-[change]d-i passwd/root-password-again password $password
+d-i passwd/root-password password @@VBOX_INSERT_ROOT_PASSWORD@@
+d-i passwd/root-password-again password @@VBOX_INSERT_ROOT_PASSWORD@@
 d-i user-setup/allow-password-weak boolean true
 d-i passwd/user-default-groups string admin
@@ -69,12 +69,12 @@
 echo 'apt-get -y install build-essential' >> post-install.sh; \
 echo 'apt-get -y install linux-headers-$(uname -r)' >> post-install.sh; \
-echo 'mkdir /mnt/cdrom' >> post-install.sh; \
+@@VBOX_COND_IS_INSTALLING_ADDITIONS@@echo 'mkdir /mnt/cdrom' >> post-install.sh; \
 echo 'echo' >> post-install.sh; \
 echo 'echo "Installing VirtualBox Guest Additions..."' >> post-install.sh; \
 echo 'mount -t iso9660 -o ro /dev/sr1 /mnt/cdrom' >> post-install.sh; \
 echo 'bash /mnt/cdrom/VBoxLinuxAdditions.run' >> post-install.sh; \
+echo 'usermod -a -G vboxsf @@VBOX_INSERT_USER_LOGIN@@' >> post-install.sh; \
 echo 'eject /dev/sr0' >> post-install.sh; \
-[change]echo 'usermod -a -G vboxsf $user' >> post-install.sh; \
-echo 'exit 0' >> post-install.sh; \
+@@VBOX_COND_END@@echo 'exit 0' >> post-install.sh; \
 chroot /target chmod +x /postinstall/post-install.sh; \
 chroot /target /bin/bash /postinstall/post-install.sh
