BLOG

BLOG

Samba config cheat sheet

This post is mostly for myself, as it contains some example samba configuration code that I use a fair bit on simple samba server setups. Often the most difficult things are rights management and file permission management, and it isn't very hard once you know how to do it. Hopefully this will...

Make permanent swap file in Linux

In Linux you can create a swap FILE that performs pretty much the same function as a separate swap PARTITION, but not with the problem that if later you need to resize some partitions you have to mess around with a partition that's in the way. Yes, I know you can delete it and fix things later but...

MySQL command-line cheat sheet

Just a few copy/paste ready commands for some basic MySQL tasks. Log in to MySQL command line as root user mysql -u root -p Add a new database create database namegoeshere; Give a user access to a database grant all privileges on namegoeshere.* to user@localhost identified by 'password'; Drop...

Passwordless SSH login with keypair

Yes many of these guides are already out there. This is just a note more for personal use. This is useful for running rsync over SSH in an automated script for example. Generate key on client side and secure it: mkdir ~/.ssh;cd ~/.ssh;ssh-keygen -t rsa;cat id_rsa.pub >> authorized_keys;chmod...

Windows route cheat-sheet

List all IPv4 routes: [code]route print -4[/code]   Add route: [code]route add (destination subnet start IP) mask (subnet mask) (target gateway IP) route add 172.16.47.0 mask 255.255.255.0 192.168.47.254[/code]   Delete route: [code]route delete (destination subnet start IP) route delete...