Denny’s OpenBSD Newbies blog

April 3, 2010

The Last Four Months

Filed under: openbsd — Tags: , , , , , , — denny @ 9:03 pm

Four months come and gone. Sick a lot. Not much accomplished
during that time other than upgrading WordPress on the blog and
installing snapshots on my laptop extra hard drive and also on my
old Pentium 4 desktop. I did manage, also, to test a patch on Nut
(Network UPS Tools) for Stuart Henderson of OpenBSD. Got it
built okay, just never really got it running right. Going to install a new
snapshot, update everything on the box and see if I can get it running
correctly.
If you add a user to aliases as root and intend to get root’s mail, be
sure not to leave it commented out. :-) Ran into all sorts of problems
with the email on the P4 until I found my omission and fixed it. Tried to
use qtool.pl to clean /var/spool/clientmqueue but no dice.
Also tried sendmail and mailq but in the end I had to fall back on
good old rm to get rid of the trash.
Learned that wget doesn’t like wildcards, so when downloading
multiple files all on one line, I can do something like:

wget http://somewhere.com/{01.jpg,02.jpg,03.jpg}

Also started doing my rsync backups over ssh like so:

rsync -e ’ssh -ax -p xxx’ -agrtv /adir/ user@somebox:/adir

After installing a snapshot on my laptop I started adding packages
and finally got around to java. I don’t like installing it, I think it’s just
another security risk too, but I need it for some things I do so I don’t
really have a choice. When I installed the snapshot I tried out the new
auto-partitioning. I don’t necessarily like the way it turned out, since it
seems like a lot of drive space got wasted in places in isn’t needed,
like in /var and /tmp. /usr was only given 2G, so when I started
building java I ran out of space pretty quickly. Got around that by
adding some directories on a second hard drive and adding some
settings to /etc/mk.conf:

ACCEPT_JRL_LICENSE=Yes
USE_SYSTRACE=Yes
WRKOBJDIR=/data/mktemp/obj
DISTDIR=/data/mktemp/distfiles
PACKAGE_REPOSITORY=/data/mktemp/packages

The first line lets java know you agree to the JRL licensing.
The second line is to detect misbehaving Makefiles, scripts, etc.
The next three lines simply save space on the /usr partition
by using the directories on the second hard drive instead of the
standard ones underneath /usr.

That’s about it. Hope to get some more work done shortly. Waiting
on my new OpenBSD 4.7 cds to arrive soon. Then there will be
a whole lot of work to be done.

Cheers!

January 24, 2009

Dump and restore update

Filed under: openbsd — Tags: , , , , , , , , , , — denny @ 2:22 am

I added some information to my Dump & Restore page concerning using
dump(8), gzip(1), zcat [compress(1)], and restore(8) to do backups
and restores. At its very most basic part is

dump -0au -f – /var ¦gzip > /data2/backups/var.dmp.gz

and

cd /target/directory
zcat /path/to/dumpfile.gz ¦restore -rf -

but the whole thing should be read since there’s an excerpt from the restore(8)
man page along with some information on using newfs(8). Hope it helps someone
someone out who’s short on hard drive space like I am.

Cheers!

Addendum Sun Feb 15 18:54:08 CST 2009

There’s a new entry on my Dump & Restore page showing how to use ssh(1), dump(8),
bzip2(1), and dd(1) to set up a remote backup routine using a secure shell network
connection. As mentioned in the write-up, special thanks again go to:
Jason Dixon on the misc@openbsd.org mailing list.

April 30, 2008

OpenBSD 4.3 Released!

Filed under: openbsd — Tags: , , , — denny @ 11:33 pm

OpenBSD 4.3 has been released! Check these links:

OpenBSD 4.3 Released
What’s New in OpneBSD 4.3

That second link is an article at OnLamp.com and looks like a good one.

On the home front, I just put a page up last night on the site on quick printing over ssh.

Quick Printing Over SSH

Cheers!

April 7, 2008

XForwarding SSH Sessions

Filed under: openbsd — Tags: , , , — denny @ 3:46 am

I kept having the same problem. I’d login to a box on the other side of the house with ssh.
Right after logging in, I could use X programs fine. Usually it’s just using ImageMagick to view
pictures friends send, or maybe xpdf to read a pdf file. But, after a while, it no longer works. I
get errors that it can no longer connect to the the display. I had read the ssh_config man page
quite a bit over time, but I definitely overlooked something important: ForwardX11Trusted yes
I had looked at it before and not paid attention to it. It was commented out and had the yes to
the right of it. I made a bad assumption thinking that yes was the default value. It’s not! Right
out of the man page:

ForwardX11Trusted
If this option is set to “yes”, remote X11 clients will have
full access to the original X11 display.

If this option is set to “no”, remote X11 clients will be con-
sidered untrusted and prevented from stealing or tampering with
data belonging to trusted X11 clients. Furthermore, the xauth(1)
token used for the session will be set to expire after 20 min-
utes. Remote clients will be refused access after this time.

The default is “no”

There it is, the default is no. And, since it’s no, as the excerpt above says, it’s going to time
out and no longer be accessible.

So, it got uncommented and I sent a SIGHUP to sshd.pid thinking all was well. It still wasn’t
It continued to time out. So, I did a kill -9 to sshd and then restarted it. After that, all was
well. It never timed out again on me. I don’t know enough about it to know if something has
changed with the last two security patches or not. Or, if it’s not reading the configuration like
it should when it gets a SIGHUP. Anyway, if you run into this, just do like I did and completely
kill sshd and then restart it.

Other news. I’m going to put up a little birthday reminder script I kludged together so I won’t
forget a birthday and wind up in the doghouse. Probably be in the next couple of days.

February 27, 2008

Whoops, New Writeup

New writeup been on the site for several days now and I forgot to mention it here on the blog. It’s on using SSH and Samba to connect to file shares through an encrypted tunnel from a windows box. Write up is at:

SSH and Samba

Powered by WordPress

Rss Feed Tweeter button Facebook button Technorati button Reddit button Myspace button Linkedin button Webonews button Delicious button Digg button Stumbleupon button Newsvine button Youtube button