Editing
FreeBSD
(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!
== Technical Notes == === Disk image via dd === dd bs=512 if=/dev/rXX# of=/some_dir/foo.dmg conv=noerror,sync === tar over netcat === * nc -v -v -w 40 -l -p 8888 > foo.tar * tar cjvf * | nc remotehost 8888 === Updating root DNS === dig @a.root-servers.net . ns > /etc/namedb/named.root === Qmail log Timestamps === Can be converted to human readable using the tai64nlocal command. === Name Services === ==== Retrieving Database Entries ==== As of FreeBSD 7 the ''getent'' utility can be used to retrieve entries from the various administrative databases. ==== Name Service Caching Daemon ==== The nscd daemon added in FreeBSD 7 improves performance of nsswitch type lookups (users, groups, etc) but can cause some surprising results with new users not being found in the system. The cache can be cleared for all users by running: <pre>%nscd -I cachename</pre> === Using IDE CD Burners === Place the following in /boot/loader.conf for IDE CDRW support: atapicam_load="YES" hw.ata.atapi_dma=1 === Using Memory Disks === FreeBSD >= 5.x have a memory disk utility that can be utilized to mount file system images. To setup a memory disk mdconfig -a -t vnode -o readonly -f /path/to/image.iso -u 1 mount -t cd9660 /dev/md1 /mnt/cdrom To reverse the process: mount -u /mnt/cdrom mdconfig -d -u 1 === Displaying Dates in 12 Hour Format === Add the following to .cshrc or /etc/csh.cshrc (system wide): alias date date +\"%a %b %e %r %Z %Y\" === View Daylight Savings Dates === zdump -v /etc/localtime | grep ''2008'' === List BIND Domains === grep ^zone < /etc/namedb/named.conf | sed -e 's/zone "\(.*\)".*/\1/g' | sort === Find Hosts in a Subnet === nmap -sP 172.31.0.128/26 === Build Port with Debugging Symbols === make WITH_DEBUG=yes === Setup LDAP Authentication === Install required ports: sudo portinstall nss_ldap sudo portinstall pam_ldap Setup ''nss_ldap.conf'' <pre> host 172.31.0.1 base dc=incoherency,dc=net uri ldap://172.31.0.1:389/ ssl start_tls binddn uid=nss,ou=dsa,dc=incoherency,dc=net bindpw ******** bind_policy soft nss_initgroups_ignoreusers root,ldap timelimit 5 nss_reconnect_tries 2 port 389 nss_base_passwd dc=incoherency,dc=net?subtree nss_base_group ou=groups,dc=incoherency,dc=net?one pam_password SSHA </pre> Link ldap.conf to nss_ldap.conf ln -s nss_ldap.conf ldap.conf Add the following to /etc/pam.d/ for each relevant service auth sufficient /usr/local/lib/pam_ldap.so no_warn try_first_pass Edit /etc/nsswitch.conf: passwd: files ldap group: files ldap === Fix for freebsd-update === %sudo freebsd-update upgrade -r 7.1-RC1 Looking up update.FreeBSD.org mirrors... 1 mirrors found. Fetching metadata signature for 7.1-PRERELEASE from update1.FreeBSD.org... failed. No mirrors remaining, giving up. % %setenv UNAME_r 7.1-BETA2 %freebsd-update upgrade -r 7.1-RC1 Looking up update.FreeBSD.org mirrors... 1 mirrors found. Fetching metadata signature for 7.1-BETA2 from update1.FreeBSD.org... done. Fetching metadata index... done. Inspecting system... done. ... === Install a standard MBR === Useful if you inadvertently install the FreeBSD boot manager or if you need to borrow a standard MBR for use on an OS that doesn't have one yet *cough* Haiku fdisk βB βb /boot/mbr ad0 === Avoid config menus on port builds === make config-recursive install === Mount ISO Image === mdconfig -a -t vnode -f <ISO filename> -u 0 mount -t cd9660 /dev/md0 <mount destination> === VirtualBox === * [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/virtualization-host.html FreeBSD Handbook] * [http://www.virtualbox.org/manual/ch08.html#vboxmanage VBoxManage] === Connect to TLS server === openssl s_client -starttls smtp -connect smtp.gmail.com:587
Summary:
Please note that all contributions to The Incoherency.Net Wiki 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
The Incoherency.Net Wiki: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
Denis Lemire's Site
Help
Tools
What links here
Related changes
Special pages
Page information