summaryrefslogtreecommitdiff
path: root/examples/example
diff options
context:
space:
mode:
Diffstat (limited to 'examples/example')
-rwxr-xr-xexamples/example/ezjail.flavour74
1 files changed, 53 insertions, 21 deletions
diff --git a/examples/example/ezjail.flavour b/examples/example/ezjail.flavour
index 6b33d11..c0e160f 100755
--- a/examples/example/ezjail.flavour
+++ b/examples/example/ezjail.flavour
@@ -1,29 +1,61 @@
1# ezjail flavour example 1#!/bin/sh
2# refer to ezjail-admin(1) for more information
3#
4# ezjails jail init script tries to create the following users. Format is
5# as follows:
6#
7# username:uid:group[,group,..]:gid[,gid,..]:comment:cryptpw:[-]homedir:shell
8#
9# Note: Since ' ' (space) does not survive shell expansion, still often is
10# useful in the comment field, '=' will be converted to ' '.
11# 2#
12# Note: Always use ''' (single ticks) to provide variables containing '$'s 3# ezjail flavour example
4
5# Hide
6######
13# 7#
14# Example: 8# Prevent this script from being called over and over
9# if something fails.
10
11rm -f /etc/rc.d/ezjail-config.sh /ezjail.flavour
12
13# Groups
14#########
15# 15#
16# ezjail_flavour_users='::heroes:1003:::: \ 16# You will probably start with some groups your users
17# admin::wheel::Admin=User:$1$p75bbfK.$Kz3dwkoVlgZrfLZdAXQt91:/home/admin:/bin/sh \ 17# should be in
18# pgsql:1002:pgsql:1002:Post=Gres::-/usr/local/psql:/bin/nologin'
19 18
20# Files or directories that should not belong to root:wheel will be 19# pw groupadd -q -n coders # -g 1004
21# chowned -R according to the following variable 20# pw groupadd -q -n sales # -g 1005
21
22# Users
23########
22# 24#
23# Format is as follows: 25# You might want to add some users.
26# The password is to be provided in the encrypted form
27# as found in /etc/master.passwd
28# refer to pw(8) for more information
29
30# echo -n '$1$p75bbfK.$Kz3dwkoVlgZrfLZdAXQt91' |\
31# pw useradd -n admin -u 1001 -s /bin/sh -m -d$ /home/admin -G wheel -c 'Admin User' -H 0
32# echo -n '$1$p75bbfK.$Kz3dwkoVlgZrfLZdAXQt91' |\
33# pw useradd -n saag -u 1002 -s /bin/sh -m -d$ /home/saag -G coders -c 'Mutton Saag' -H 0
34# echo -n '$1$p75bbfK.$Kz3dwkoVlgZrfLZdAXQt91' |\
35# pw useradd -n mac -u 1002 -s /bin/sh -m -d$ /home/mac -G sales -c 'Big Mac' -H 0
36
37# Files
38########
24# 39#
25# user:group:file[:file...] 40# You can now give files to users just created
41
42# chown -R admin:coders /usr/local/cvsroot
43# chown -R admin:sales /usr/local/nfs/sales
44
45# Packages
46###########
26# 47#
27# Example: 48# Install all packages previously put to /pkg
49
50[ -d /pkg ] && PACKAGESITE=file:// pkg_add -r /pkg/*
51rm -rf /pkg
52
53# Postinstall
54#################
28# 55#
29# ezjail_flavour_files='admin:wheel:/home/admin/' 56# Your own stuff here, for example set login shells
57# that were only installed just before
58
59# chpass -s /usr/local/bin/bash admin
60# pkg_add -r pico
61# cd /usr/ports/sysutils/screen && make install