Editing
Infrastructure Machines
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Setup jail == <pre> mkdir /mnt/data1/wiki-dir cd /usr/src make installworld DESTDIR=/mnt/data1/wiki-dir cd etc make distribution DESTDIR=/mnt/data1/wiki-dir mount -t devfs devfs /mnt/data1/wiki-dir/dev devfs -m /mnt/data1/wiki-dir/dev rule -s 3 applyset cd /mnt/data1/wiki-dir ln -sf dev/null kernel scp jail9:/usr/local/sbin/jkill /mnt/data1/wiki-dir/sbin jail /mnt/data1/wiki-dir wiki.johncompanies.com 69.55.229.8 /bin/sh csh touch /etc/fstab echo 'network_interfaces=""\ hostname="wiki.johncompanies.com"\ kern_securelevel_enable="NO"\ sendmail_enable="YES"\ sshd_enable="YES"' > /etc/rc.conf echo "nameserver 69.55.229.3\ nameserver 69.55.225.225" >> /etc/resolv.conf vi /etc/crontab (remove the adjkerntz lines ) vi /etc/periodic/security/100.chksetuid replace: MP=`mount -t ufs | grep -v " nosuid" | awk '{ print $3 }' | sort` with: MP='/' (use single quotes) mkdir -p /usr/compat/linux/dev adduser Username: user Full name: user Uid (Leave empty for default): Login group [user]: Login group is user. Invite user into other groups? []: wheel Login class [default]: Shell (sh csh tcsh nologin) [sh]: Home directory [/home/user]: Home directory permissions (Leave empty for default): Use password-based authentication? [yes]: Use an empty password? (yes/no) [no]: Use a random password? (yes/no) [no]: y Lock out the account after creation? [no]: Username : user Password : <random> Full Name : user Uid : 1001 Class : Groups : user Home : /home/user Home Mode : Shell : /bin/sh Locked : no OK? (yes/no): y adduser: INFO: Successfully added (user) to the user database. adduser: INFO: Password for (user) is: 901gmYjO Add another user? (yes/no): n Goodbye! vi /usr/home/user/.profile TERM=vt100; export TERM tzsetup newaliases rm /sbin/halt /sbin/reboot ln /sbin/jkill /sbin/halt ln /sbin/jkill /sbin/reboot vi /etc/syslog.conf #*.err;kern.warning;auth.notice;mail.crit /dev/console *.err;kern.warning;auth.notice;mail.crit /var/log/messages exit exit cd libexec chflags noschg ld-elf32.so.1 chflags noschg ld-elf.so.1 mv ld-elf32.so.1 ld-elf32.so.1-orig ln ld-elf.so.1 ld-elf32.so.1 chflags schg ld-elf.so.1 chflags schg ld-elf32.so.1 cp -r /usr/ports /mnt/data1/wiki-dir/usr cat > /usr/local/etc/rc.d/wiki.sh mount -t devfs devfs /mnt/data1/wiki-dir/dev/ devfs -m /mnt/data1/wiki-dir/dev rule -s 3 applyset jail /mnt/data1/wiki-dir wiki.johncompanies.com 69.55.229.8 /bin/sh /etc/rc chmod 0700 /usr/local/etc/rc.d/wiki.sh </pre>
Summary:
Please note that all contributions to JCWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
JCWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information