Sha256: 6ede742c9f46de0be67241421ccbc69218fc38f2b69c0c6846bdea9de9808804

Contents?: true

Size: 1.36 KB

Versions: 16

Compression:

Stored size: 1.36 KB

Contents

#!/bin/sh
#
# Sample Finish Script to enable vagrant post install

VAGRANTUSER='vagrant'

# Selecting host name
echo "vagrant-solaris10.dev" > /a/etc/nodename

# Allowing root SSH
cat /a/etc/ssh/sshd_config | sed -e 's/PermitRootLogin\ .*$/PermitRootLogin yes/g' > /tmp/sshd_config.$$
cat /tmp/sshd_config.$$ > /a/etc/ssh/sshd_config

## Create 'vagrant:vagrant'
# Simple passwords
cat /a/etc/default/passwd | sed -e 's/^#NAMECHECK=.*$/NAMECHECK=NO/g' \
    -e 's/^#MINNONALPHA=.*$/MINNONALPHA=0/g' > /tmp/passwd.$$
cat /tmp/passwd.$$ > /a/etc/default/passwd

# 'vagrant:vagrant' creation
chroot /a /usr/sbin/groupadd ${VAGRANTUSER}
chroot /a /usr/sbin/useradd -m -d /export/home/${VAGRANTUSER} -s /usr/bin/bash -g ${VAGRANTUSER} ${VAGRANTUSER}

PASSWD=`perl -e 'print crypt($ARGV[0], substr(rand(data),2));' vagrant`
cat /a/etc/shadow | sed -e 's#^'${VAGRANTUSER}':UP:#'${VAGRANTUSER}':'${PASSWD}'#g'  > /tmp/shadow.$$
cat /tmp/shadow.$$ > /a/etc/shadow


# Install 'Primary Administrator' profile
cat /cdrom/Solaris_10/Product/SUNWwbcor/reloc/etc/security/auth_attr >> /a/etc/security/auth_attr
cat /cdrom/Solaris_10/Product/SUNWwbcor/reloc/etc/security/exec_attr >> /a/etc/security/exec_attr
cat /cdrom/Solaris_10/Product/SUNWwbcor/reloc/etc/security/prof_attr >> /a/etc/security/prof_attr

# Assign it to 'vagrant'
chroot /a /usr/sbin/usermod -P'Primary Administrator' ${VAGRANTUSER}

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
veewee-0.5.0.alpha4 templates/solaris-10-ga-x86/jumpstart/finish
veewee-0.5.0.alpha3 templates/solaris-10-ga-x86/jumpstart/finish
veewee-0.5.0.alpha2 templates/solaris-10-ga-x86/jumpstart/finish
veewee-0.5.0.alpha1 templates/solaris-10-ga-x86/jumpstart/finish
veewee-0.4.5.1 templates/solaris-10-ga-x86/jumpstart/finish
veewee-0.4.5 templates/solaris-10-ga-x86/jumpstart/finish
veewee-0.4.5.pre1 templates/solaris-10-ga-x86/jumpstart/finish
veewee-0.4.4 templates/solaris-10-ga-x86/jumpstart/finish
veewee-0.4.3 templates/solaris-10-ga-x86/jumpstart/finish
veewee-0.4.2 templates/solaris-10-ga-x86/jumpstart/finish
veewee-0.4.1 templates/solaris-10-ga-x86/jumpstart/finish
veewee-0.4.0 templates/solaris-10-ga-x86/jumpstart/finish
veewee-0.3.12 templates/solaris-10-ga-x86/jumpstart/finish
veewee-0.3.11 templates/solaris-10-ga-x86/jumpstart/finish
veewee-0.3.10 templates/solaris-10-ga-x86/jumpstart/finish
veewee-0.3.9 templates/solaris-10-ga-x86/jumpstart/finish