Skip to content

Commit

Permalink
Merge pull request #2 from sjones4/issue-login-user
Browse files Browse the repository at this point in the history
Service image cloud-user user
  • Loading branch information
sjones4 committed Mar 22, 2018
2 parents d9d1a7d + eab73e3 commit a42fa4d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions eucalyptus-service-image.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,18 @@ exec /sbin/mingetty /dev/ttyS0
EOF

# Configure sudo
sed -i '/requiretty/s/^/#/' /etc/sudoers
sed -i '/!visiblepw/s/^/#/' /etc/sudoers
echo "cloud-user ALL = NOPASSWD: ALL" >> /etc/sudoers

# Configure cloud-init
sed -i 's/name: fedora/name: cloud-user/' /etc/cloud/cloud.cfg
sed -i 's/gecos: Fedora Cloud User/gecos: Cloud User/' /etc/cloud/cloud.cfg
sed -i 's/name: centos/name: cloud-user/' /etc/cloud/cloud.cfg

# Configure networking
echo "NOZEROCONF=yes" >> /etc/sysconfig/network
echo "NETWORKING=yes" >> /etc/sysconfig/network

# Configure sshd
sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
sed -i 's/GSSAPIAuthentication yes/GSSAPIAuthentication no/' /etc/ssh/sshd_config
cat >> /etc/ssh/sshd_config <<EOF
UseDNS no
PermitRootLogin without-password
Expand Down

0 comments on commit a42fa4d

Please sign in to comment.