parsed.org

Tips by tag: freebsd

Adding Users with Passwords by xinu on Sep 10, 2005 12:13 AM

BSD is a little paranoid about where your passwords come from, so they'll insist on getting it from a stream. Here's an example:

(edit the file '/tmp/pass' and deposit the password there)            
% su root -c sh
Password:
# pw useradd -n test -c "Test User" -m -h 3 3< /tmp/pass
# grep test /etc/master.passwd
test:$1$T2tu0BET$UGPrNB1FavzjlzhTwUWRN.:1002:1002::0:0:Test User:/home/test:/bin/sh
# exit
% su test
Password: [typed "foobar" here...]
$ exit
bsdcommandsfreebsdneatparanoidpasswordspwsecurity
Libraries by xinu on Mar 22, 2005 08:54 AM

FreeBSD's ldconfig binary doesn't work the same as the one in Linux derivatives. If you happen to type ldconfig -v, for instance, you're going to lose all your configuration information. To fix the problem:

# ldconfig -m /usr/local/lib/compat/pkg                                                          
# ldconfig -m /usr/libexec                                                                       
# ldconfig -m /usr/X11R6/lib                                                                     
# ldconfig -m /usr/local/lib                                                                     
# ldconfig -m /usr/lib
bsdcommandsfreebsdldconfiglibraries
PostgreSQL Client by xinu on Jan 19, 2005 07:35 AM

If you just need the client and not the binary, you can modify the behavior of the port installation like so:

# cd /usr/ports/postgresql7
# make install clean WITHOUT_SERVER=yes

To see the other tasty build options:

# make build
bsdcommandsfreebsdmakepostgresql
System Monitoring by xinu on Jan 20, 2005 08:58 PM

A nice way to take the pulse of a BSD machine is to run systat -vm. It updates often and includes quite a bit of useful information.

bsdcommandsfreebsdmonitoringsystat
RSS