Sat May 28 00:36:39 BST 2011

A (rather late) intro...

ok, I suppose I should justify this in some way as I know what's going on and you may not...

I have been keeping minor notes about some of my 'discoveries' and wanted to look back on them, figuring they may help others, I've put them into this blog and freed it up for the world to see, if it helps you in any way please drop me a comment or email :) -----

Posted by Phill | Permalink

Sat May 28 00:32:08 BST 2011

scp quirk

scp quirkolgy!

scp what where, but if the what or where feature spaces, the path has to be in quotes AND have the spaces escaped, eg
scp "my\ file" 192.168.255.255:"/home/user/My\ Documents"
just a quick one :) -----

Posted by Phill | Permalink

Sat May 28 00:30:56 BST 2011

Mail!

Exim and email

When I first tried this, I had no idea what I was doing, this was my 3rd attmept and is a mitigated success.
emerge exim dovecot spamassassin ClamAV mutt squirrelmail
Exim configuration is described everywhere as a tome of legendary proportions, but the layout is in fact reasonably sensible:

router sections to decide how to handle traffic depending on where it's from / going

dovecot wasn't configured at all other than emerging; although the appropriate aliases need to be configured in /etc/aliases

spamassassin doesn't work, nor does clamAV; although sa should just require definitions which it seems to not be able to get hold of atm.

SquirrelMail has a separate installation program, webapp install; this installs it to an existing virtualhost / /var/www/folder; you have to add a VirtualHost into /etc/apache2/vhost.d/ I add mine to the default, however I shouldn't :)

Resolution was sorted through name based vhosts, which is causing problems inside the house as DNS reports the external IP for everything, which loads the router page, rather than my /etc/hosts which has appropriate addresses.

Editing /etc/nsswitch.conf was supposed to tell the network daemons to look in files before loading DNS however this doesn't entirely seem to work as after a while it goes back to using DNS...

Mutt is nice and easy to use, again working from installation, although you do have to edit ~/.muttrc to set your from name and the send address. Both of these revert to user@subdomain.domain.ext (eg phill@morrigan.agrona.co.uk) which was aethetically unappealing.

The only gripe I have with mutt is I don't know how to force it to re-check for mail and I'm not entirely sure how often it checks. The bash variable is set to 1 minute, although bash doesn't tell me when I have new emails at the minute anyway... -----

Posted by Phill | Permalink

Sat May 28 00:29:03 BST 2011

mplayer adventures without X

mplayer in frambuffer
mplayer -vo fbdev -vf scale -x xres -y yres -zoom [filename]
on my machine xres is 1024 and yres is 768

the zoom is mandatory, otherwise the picture doesn't fill the screen, no matter what you set xres and yres to...

if you're running the film in the same TTY as you're typing in (as opposed to over ssh, for example) adding a -quiet will suppress the mplayer output at the bottom of the screen (try -really-quiet, if you need to). -----

Posted by Phill | Permalink

Sat May 28 00:24:49 BST 2011

episode 3

sshd:

editing the sshd configuration file to stop people logging in...

To get sshd listening on more than 1 port enter each port on separate lines, eg:
Port 12
Port 22
Always a good idea for PermitRootLogin to be set to no, but on my home systems, I have set a 'match' to allow people inside the NAT to login as root:
Match Address 192.168.1.*
	PermitRootLogin yes
Could also be used from my fixed IP server, I suppose...

An earlier foray into security gave me (from David Ambrose-Griffith)
AllowGroups ssh
where each user has to be in the ssh group to use the ssh daemon. -----

Posted by Phill | Permalink

Sat May 28 00:22:35 BST 2011

episode 2 :)

The 'world' file:

/var/lib/portage/world; this file lists the programs you have elected to install through portage.

Copying to another computer should fundamentally copy a system, this didn't work... -----

Posted by Phill | Permalink

Sat May 28 00:20:36 BST 2011

Forays into Linux SysAdmin

WoL:

ok, I love WoL, it makes me only need to leave one computer per house on!

The basic fundamentals for it (on Gentoo) are:
emerge ethtool
run ethtool -s eth0 wol g
This turns support on, then halt and try waking your machine with a MagicPacket from another machine with one of the wol, wakeonlan or similar programs.

*Extra note for Fedora; the halt script turns the power to the card off, and removing a -i from the shutdown script solves that.

If your computer wakes the first time, but not the second, the settings are not getting saved, an easy workaround is to add
'ethtool -s eth0 wol g' 
to the /etc/local.start file (or local.stop file, but the start is a better choice in case of an ungraceful shutdown, both is probably worth considering too...)

For Gentoo, add the ethtool command to your /etc/local.d/ethtool.stop file (tip for baselayout 2 - also you have to create the file) -----

Posted by Phill | Permalink