Created
November 20, 2014 14:18
-
-
Save ashphy/7a91cdf4f0317464b60c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version=RHEL7 | |
# System authorization information | |
cmdline | |
install | |
auth --enableshadow --passalgo=sha512 | |
ignoredisk --only-use=vda | |
# Use network installation | |
url --url="ftp://ftp.iij.ad.jp/pub/linux/centos/7/os/x86_64/" | |
# Run the Setup Agent on first boot | |
firstboot --enable | |
# Keyboard layouts | |
keyboard --vckeymap=us --xlayouts='us' | |
# System language | |
lang en_US.UTF-8 | |
# Network information | |
network --bootproto=static --device=eth0 --gateway=192.168.1.1 --ip=192.168.1.4 --nameserver=192.168.1.1 --netmask=255.255.255.0 --ipv6=auto --activate | |
network --hostname=test.home.ashphy.com | |
# Root password | |
rootpw --iscrypted $6$YaxR/X3IqjJYB8wX$WYG4W7ZmMy1eWQa9LHKmBkTUYErC10dAj.W4BUNaHZrwWYiBBR1OP4cIg.NR0JyqOy83YDk3UoMpnenQk90mc. | |
# Do not configure the X Window System | |
skipx | |
# System timezone | |
timezone Asia/Tokyo --isUtc --ntpservers=0.jp.pool.ntp.org,1.jp.pool.ntp.org,2.jp.pool.ntp.org,3.jp.pool.ntp.org | |
user --groups=wheel --name=ashphy --password=[PASSWORD] --iscrypted --gecos="Kazuki Hamasaki" | |
bootloader --location=mbr --boot-drive=vda | |
# System bootloader configuration | |
zerombr | |
# Partition clearing information | |
clearpart --all --initlabel | |
autopart | |
%packages | |
@core | |
%post | |
## sshd deny password authentication | |
sed -i 's/^PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config | |
install -d -m 0700 -o ashphy -g users /home/ashphy/.ssh | |
cat > /home/ashphy/.ssh/authorized_keys <<KEY | |
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAqA5uUeUh+vVUnwrsOMRn2n617yZvyOVfZWLD+J+0gD6hHmqLLyq3t7pZtNTwDovlGFTcuxzFucFvRaH0OgoMTIfdmTYyYJo8Y2yxQknj+ZLphHTluoFGIW8V5zW5QJ/rOOxkhe4/doZeOXacQ+4vHzLaox5MPvUVgMfhFGlcPS0= | |
KEY | |
chown ashphy:ashphy /home/ashphy/.ssh/authorized_keys | |
%end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment