]> git.proxmox.com Git - mirror_lxc.git/commitdiff
don't set a default password for altlinux, gentoo, openmandriva and pld
authorEvgeni Golov <evgeni@debian.org>
Sun, 19 Mar 2017 17:47:17 +0000 (18:47 +0100)
committerEvgeni Golov <evgeni@debian.org>
Sun, 19 Mar 2017 17:48:22 +0000 (18:48 +0100)
Refs: #1158
Signed-off-by: Evgeni Golov <evgeni@debian.org>
templates/lxc-altlinux.in
templates/lxc-gentoo.in
templates/lxc-openmandriva.in
templates/lxc-pld.in

index 69c18d4ba0cf915b24599643e66d4f29485f5418..7accf2468e6911527bc451a37e26f9a592101d8b 100644 (file)
@@ -43,7 +43,6 @@ cache_base=@LOCALSTATEDIR@/cache/lxc/altlinux/$arch
 default_path=@LXCPATH@
 default_profile=default
 profile_dir=/etc/lxc/profiles
-root_password=rooter
 lxc_network_type=veth
 lxc_network_link=virbr0
 
@@ -156,8 +155,10 @@ EOF
     mkdir -m 755 ${dev_path}/net
     mknod -m 666 ${dev_path}/net/tun c 10 200
 
-    echo "setting root passwd to $root_password"
-    echo "root:$root_password" | chroot $rootfs_path chpasswd
+    if [ -n "${root_password}" ]; then
+        echo "setting root passwd to $root_password"
+        echo "root:$root_password" | chroot $rootfs_path chpasswd
+    fi
 
     return 0
 }
index 2ad16e85783d1c043ebaebe3969e4f9a8c50a312..47f24d0d5e18a380dedacd37e0c058313ff18a06 100644 (file)
@@ -654,8 +654,6 @@ container_auth()
         printf "  => done. if you didn't specify , default is 'toor'\n"
         if [[ -n "${forced_password}" ]]; then
             store_user_message "${user} has the password you give for him"
-        else
-            store_user_message "${user} has the default password 'toor', please change it ASAP"
         fi
     fi
 
@@ -779,7 +777,6 @@ set_default_arch
 
 mirror="http://distfiles.gentoo.org"
 user="root"
-password="toor"
 tty=1
 settings="common"
 options=$(getopt -o hp:n:a:FcPv:t:S:u:w:s:m: -l help,rootfs:,path:,name:,arch:,flush-cache,cache-only,private-portage,variant:,portage-dir:,tarball:,auth-key:,user:,autologin,password:,settings:,mirror:,tty: -- "$@")
index 12f998512da48784f69b42c5aad27aa1afa0656c..daba81202fea947bb8851ed086774c3612499083 100644 (file)
@@ -46,7 +46,6 @@ hostarch=$(uname -m)
 cache_base="${LXC_CACHE_PATH:-@LOCALSTATEDIR@/cache/lxc/openmandriva/$arch}"
 default_path=@LXCPATH@
 default_profile=default
-root_password=root
 lxc_network_type=veth
 lxc_network_link=br0
 
index f233ae6a6c392f9818bb89c4d3e3bfed2cfc5f48..a8e534646fd1795828bdb3cd0b21185ff37a0191 100644 (file)
@@ -38,7 +38,6 @@ done
 arch=$(uname -m)
 cache_base=@LOCALSTATEDIR@/cache/lxc/pld/$arch
 default_path=@LXCPATH@
-root_password=root
 
 if [ -e /etc/os-release ]; then
        # This is a shell friendly configuration file.  We can just source it.
@@ -105,8 +104,10 @@ EOF
        mknod -m 600 ${dev_path}/initctl p
        mknod -m 666 ${dev_path}/ptmx c 5 2
 
-       echo "setting root passwd to $root_password"
-       echo "root:$root_password" | chroot $rootfs_path chpasswd
+       if [ -n "${root_password}" ]; then
+               echo "setting root passwd to $root_password"
+               echo "root:$root_password" | chroot $rootfs_path chpasswd
+       fi
 
        return 0
 }