Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
19d618b1
Commit
19d618b1
authored
Jun 01, 2010
by
Daniel Lezcano
Committed by
Daniel Lezcano
Jun 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change root passwd for debian template
Change default root password to 'root' and generate locales automatically Signed-off-by:
Daniel Lezcano
<
dlezcano@fr.ibm.com
>
parent
3a3ba44a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
31 deletions
+9
-31
lxc-busybox.in
scripts/lxc-busybox.in
+3
-7
lxc-debian.in
scripts/lxc-debian.in
+6
-24
No files found.
scripts/lxc-busybox.in
View file @
19d618b1
...
@@ -74,13 +74,6 @@ EOF
...
@@ -74,13 +74,6 @@ EOF
root:x:0:root
root:x:0:root
EOF
EOF
# empty password
cat
<<
EOF
>>
$rootfs
/etc/shadow
root:\
$1
\
$NJJLsV0P
\
$Y
/esfSXDNR88G/bZFzgWY1:14595:0:99999:7:::
EOF
echo
"empty password for root, don't forget to change it !"
# mount everything
# mount everything
cat
<<
EOF
>>
$rootfs
/etc/init.d/rcS
cat
<<
EOF
>>
$rootfs
/etc/init.d/rcS
#!/bin/sh
#!/bin/sh
...
@@ -214,6 +207,9 @@ configure_busybox()
...
@@ -214,6 +207,9 @@ configure_busybox()
# passwd exec must be setuid
# passwd exec must be setuid
chmod
+s
$rootfs
/bin/passwd
chmod
+s
$rootfs
/bin/passwd
echo
"root:root"
|
chroot
$rootfs
chpasswd
echo
"Root password is 'root', please change !"
return
0
return
0
}
}
...
...
scripts/lxc-debian.in
View file @
19d618b1
...
@@ -49,29 +49,6 @@ EOF
...
@@ -49,29 +49,6 @@ EOF
mkdir
-p
$rootfs
/selinux
mkdir
-p
$rootfs
/selinux
echo
0
>
$rootfs
/selinux/enforce
echo
0
>
$rootfs
/selinux/enforce
# by default setup root password with no password
cat
<<
EOF
>
$rootfs
/etc/ssh/sshd_config
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 768
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords yes
ChallengeResponseAuthentication no
EOF
# configure the network using the dhcp
# configure the network using the dhcp
cat
<<
EOF
>
$rootfs
/etc/network/interfaces
cat
<<
EOF
>
$rootfs
/etc/network/interfaces
auto lo
auto lo
...
@@ -87,12 +64,17 @@ $hostname
...
@@ -87,12 +64,17 @@ $hostname
EOF
EOF
# reconfigure some services
# reconfigure some services
chroot
$rootfs
/usr/sbin/dpkg-reconfigure locales
chroot
$rootfs
locale-gen en_US.UTF-8
# remove pointless services in a container
# remove pointless services in a container
chroot
$rootfs
/usr/sbin/update-rc.d
-f
umountfs remove
chroot
$rootfs
/usr/sbin/update-rc.d
-f
umountfs remove
chroot
$rootfs
/usr/sbin/update-rc.d
-f
hwclock.sh remove
chroot
$rootfs
/usr/sbin/update-rc.d
-f
hwclock.sh remove
chroot
$rootfs
/usr/sbin/update-rc.d
-f
hwclockfirst.sh remove
chroot
$rootfs
/usr/sbin/update-rc.d
-f
hwclockfirst.sh remove
echo
"root:root"
|
chroot
$rootfs
chpasswd
echo
"Root password is 'root', please change !"
return
0
}
}
download_debian
()
download_debian
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment