Accidently deleted sysctl.conf!


#1

Someone can help me and post default trident sysctl.conf


#2

ls -l /etc/sysctl.conf
-rw-r–r-- 1 root wheel 0 Jan 16 07:15 /etc/sysctl.conf

cat /etc/defaults/sysctl.conf
Password:

This file is read when going to multi-user and its contents piped thru

sysctl'' to adjust kernel values.man 5 sysctl.conf’’ for details.

Place local overides in /etc/sysctl.conf

Enable defaults for system hardening

security.bsd.see_other_uids=0
security.bsd.see_other_gids=0
security.bsd.see_jail_proc=0
security.bsd.unprivileged_read_msgbuf=0
security.bsd.unprivileged_proc_debug=0
kern.randompid=1

Disable coredump

kern.coredump=0

Enable shm_allow_removed

kern.ipc.shm_allow_removed=1

Speed up the shutdown process

kern.shutdown.poweroff_delay=500

Don’t hang on shutdown when using USB disks

hw.usb.no_shutdown_wait=1

Disable the system bell

kern.vt.enable_bell=0


#3

Thanks @RodMyers! If i remember correctly there was some entries about zfs aesni vfs and something more


#4

/etc/sysctl.conf on my system is 0 bytes.

you see what my default system has


#5

ok, Thanks again @RodMyers


#6

to follow up on @RodMyers FreeBSD configuration files have two places: /etc/defaults and /etc.

The version in /etc/defaults is the system install default values and are allowed to be overwritten by a system upgrade.

The version in /etc contains just the values you want to override and is not touched by a system upgrade.

So, never change the value in /etc/defaults, create a new line in the /etc version.


#7

thanks @mer


#8

@chkp not a problem. It’s a subtle thing that a lot of people miss; they make a change in /etc/defaults/sysctl.conf, upgrade then complain “the upgrade broke my system” :slight_smile: