[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

flavor not working properly, user not creating



Hello,
   I'm running ezjail on FreeBSD 6.2. I've got to create multiple jails
each with different requirements for users, groups, etc. So i thought about
using a flavor, my flavor file is below. My first question is about users
and password creation. Going down ezjail.flavors i see that echo -n
'<encryptedpassword' is used and that is piped in to the  next line pw
command used as input to the -H 0 option,  making a user silently. My
question is how is this encrypted password generated? When i create the
testjail, i do get packages and ports installing, but not any users or
groups. I want one jail to have one user, but not the second one. When i
start the testjail using ezjails startup script i don't get any output so i
do not know where the creation process is snagging out. I'd also like to
have different ssh options for jails, i didn't see where in the flavor to
enable that.
Thanks.
Dave.

ezjail.flavor(excerpt)
# Groups
#########
#
# You will probably start with some groups your users should be in

pw groupadd -q -n coders -g 200

# Users
########
#
# You might want to add some users. The password is to be provided in the
# encrypted form as found in /etc/master.passwd.
# The example password here is "admin"
# Refer to crypt(3) and pw(8) for more information

# echo -n '$1$p75bbfK.$Kz3dwkoVlgZrfLZdAXQt91' |\
# pw useradd -n admin -u 1001 -s /bin/sh -m -d /home/admin -G wheel -c
'Admin User' -H 0
pw useradd -n admin -u 2011 -s /bin/sh -m -d /home/admin -G
wheeli,coders -c 'Admin User' -h 0

# Postinstall
##############
#
# Your own stuff here, for example set login shells that were only
# installed just before.

# Please note, that for all network related stuff like ports,
# package remote fetching, etc. you need a sane /etc/resolv.conf

chpass -s /usr/local/bin/bash admin
pkg_add -r pico
cd /usr/ports/sysutils/screen && make install