2006-02-09 00:44:49 +00:00
|
|
|
#!/bin/sh
|
2005-12-18 16:47:21 +00:00
|
|
|
#
|
2006-02-09 16:01:57 +00:00
|
|
|
# BEFORE: DAEMON
|
|
|
|
#
|
2006-02-09 00:44:49 +00:00
|
|
|
# ezjail flavour example
|
|
|
|
|
|
|
|
# Hide
|
2006-02-09 16:01:57 +00:00
|
|
|
#######
|
2005-12-18 16:47:21 +00:00
|
|
|
#
|
2006-02-09 16:01:57 +00:00
|
|
|
# Prevent this script from being called over and over if something fails.
|
2006-02-09 00:44:49 +00:00
|
|
|
|
2010-01-11 16:56:33 +00:00
|
|
|
rm -f /etc/rc.d/ezjail-config /ezjail.flavour
|
2006-02-09 00:44:49 +00:00
|
|
|
|
|
|
|
# Groups
|
|
|
|
#########
|
2005-12-18 16:47:21 +00:00
|
|
|
#
|
2006-02-09 16:01:57 +00:00
|
|
|
# You will probably start with some groups your users should be in
|
2005-12-18 16:47:21 +00:00
|
|
|
|
2006-02-09 00:44:49 +00:00
|
|
|
# pw groupadd -q -n coders # -g 1004
|
|
|
|
# pw groupadd -q -n sales # -g 1005
|
|
|
|
|
|
|
|
# Users
|
|
|
|
########
|
2005-12-31 01:50:10 +00:00
|
|
|
#
|
2010-01-11 16:56:33 +00:00
|
|
|
# You might want to add some users. The password is to be provided in the
|
2006-02-10 15:33:41 +00:00
|
|
|
# encrypted form as found in /etc/master.passwd.
|
|
|
|
# The example password here is "admin"
|
|
|
|
# Refer to crypt(3) and pw(8) for more information
|
2006-02-09 00:44:49 +00:00
|
|
|
|
|
|
|
# echo -n '$1$p75bbfK.$Kz3dwkoVlgZrfLZdAXQt91' |\
|
2006-02-10 15:33:41 +00:00
|
|
|
# pw useradd -n admin -u 1001 -s /bin/sh -m -d /home/admin -G wheel -c 'Admin User' -H 0
|
2006-02-09 00:44:49 +00:00
|
|
|
# echo -n '$1$p75bbfK.$Kz3dwkoVlgZrfLZdAXQt91' |\
|
2006-02-10 15:33:41 +00:00
|
|
|
# pw useradd -n saag -u 1002 -s /bin/sh -m -d /home/saag -G coders -c 'Mutton Saag' -H 0
|
2006-02-09 00:44:49 +00:00
|
|
|
# echo -n '$1$p75bbfK.$Kz3dwkoVlgZrfLZdAXQt91' |\
|
2006-02-10 15:33:41 +00:00
|
|
|
# pw useradd -n mac -u 1002 -s /bin/sh -m -d /home/mac -G sales -c 'Big Mac' -H 0
|
2006-02-09 00:44:49 +00:00
|
|
|
|
|
|
|
# Files
|
|
|
|
########
|
2005-12-18 16:47:21 +00:00
|
|
|
#
|
2006-02-09 00:44:49 +00:00
|
|
|
# You can now give files to users just created
|
|
|
|
|
|
|
|
# chown -R admin:coders /usr/local/cvsroot
|
|
|
|
# chown -R admin:sales /usr/local/nfs/sales
|
|
|
|
|
|
|
|
# Packages
|
|
|
|
###########
|
2005-12-18 16:47:21 +00:00
|
|
|
#
|
2006-02-09 00:44:49 +00:00
|
|
|
# Install all packages previously put to /pkg
|
2006-02-09 16:01:57 +00:00
|
|
|
# Remove package files afterwards
|
2006-02-09 00:44:49 +00:00
|
|
|
|
|
|
|
[ -d /pkg ] && PACKAGESITE=file:// pkg_add -r /pkg/*
|
|
|
|
rm -rf /pkg
|
|
|
|
|
|
|
|
# Postinstall
|
2006-02-09 16:01:57 +00:00
|
|
|
##############
|
2005-12-18 16:47:21 +00:00
|
|
|
#
|
2010-01-11 16:56:33 +00:00
|
|
|
# Your own stuff here, for example set login shells that were only
|
2006-02-10 19:29:47 +00:00
|
|
|
# installed just before.
|
|
|
|
|
|
|
|
# Please note, that for all network related stuff like ports,
|
|
|
|
# package remote fetching, etc. you need a sane /etc/resolv.conf
|
2006-02-09 00:44:49 +00:00
|
|
|
|
|
|
|
# chpass -s /usr/local/bin/bash admin
|
|
|
|
# pkg_add -r pico
|
|
|
|
# cd /usr/ports/sysutils/screen && make install
|