Setup a public samba share

Something like this is easy to find on google but just a note to myself: 1) Set security = share 2) Make a share like so: [mnt] path = /mnt comment = mntroot browseable = yes guest ok = yes read only = no #set to yes most likely, this will allow rw in its current state using the nobody user write list = john # or you can do this public = yes

Continue reading ↦

Installing Xen (XCP) on Debian 7

UPDATE – The Purge… So following instructions isn’t enough apparantly. Connecting to the server with XenCenter opened my eyes. A) To use local disks, you have to use a cli utility that doesn’t seem to work properly for me (thinks /dev/sda1 is for sure in use when it actually is not) and seems to not understand anything but an LVM setup. Now yes, I didn’t do LVM when I installed Xen but seriously?

Continue reading ↦

Add ~/Library shortcut to Finder

Yeah for some reason, by default, this is like a hidden folder in Finder. Here is how to get it in your side bar: 1) Open Finder 2) Click , Go > Go To Folder, enter in the full path to the ~/Library directory 3) It should open in Finder. Now, drag the blue folder icon in the title bar and place it anywhere you’d like in the sidebar. 4) Done.

Continue reading ↦

Don't trust the support downloads

I recently just bought a usb gigabit ethernet adapter for my macbook pro. I got it from monoprice.com, the greatest place for anything cable/connector related. It came with a driver disk which I promptly set aside expecting to throw away when I next walked by the trash can. I went onto the monoprice driver page and looked for the product I just bought, and clicled download: PID 5345 USB 2.0 Gigabit Ethernet Adapter Drivers

Continue reading ↦

The Gentoo DNS/GW Conspiracy

Alright heres what I needed to do. I have a gentoo vm on my mac. The Gentoo vm has two interfaces, eth0 which is bridged and eth1 which is shared with my mac. Upon boot, both interfaces become “UG” status (in a netstat -rn) meaning they are both default gateways. This works while I’m at work since I’m on the comapny lan anyway so either way, stuff is going the right way.

Continue reading ↦

Change a users UID

1) Make sure all of the users processes are dead. ps -u username ^will show you everything that user is running. Then to kill all of their processes: ps -ef | grep admin | awk ‘{ print $2 }’ | xargs kill -9 (or you can su to them and run “kill -9 -1?) 2) Obviously as root, run the following: usermod -u NEWUID username 3) Or, you could just edit passwd.

Continue reading ↦

Securing your public key logins through authorized_keys

It a good idea, especially if you making keys just for automated processes to run like an rsync for instance, to tell the remote end to only allow certain clients to do certain things. Here’s a few tips on things to add to the beginning of your public key in authorized_keys: 1) Lets only allow from a specific host or set of hosts: from=”*.ac.uk” 2) Let’s not allow anything else at all, not even a tty or forwarding etc.

Continue reading ↦

Stop Sudo from asking for a password everytime

If the user doesn’t have a password set or your just tired of being prompted everytime you use sudo, heres the solution. Edit the line that defines the group/user in the sudoers file to look like this (more here): username ALL=(ALL) NOPASSWD: ALL This might be nice if your are using only public/private keys for your users and so a: passwd -l username can be used to disable/lock the users’ password (this only means they can’t possibly use a password to login, it does not mean they can’t log in).

Continue reading ↦

How to use a Tunnel with SSH

So I ran into a situation where I needed to tunnel my SSH connections through a SOCKS5 proxy. I discovered through the googles that this is actually possible right through SSH itself meaning no jenky hack arounds. All you need to do is ensure you have “nc” installed (netcat) and add the following to either your command or config file: CLI: -o ‘ProxyCommand /usr/bin/nc -x localhost:3128 %h %p’ Config: ProxyCommand /usr/bin/nc -x localhost:3128 %h %p

Continue reading ↦

Installing Xcode and the Command Line Tools

So. You will find when using a mac that you need Xcode to run a lot of certain types of applications. I guess you could maybe think about it as .NET on windows (im not really for sure, i could be completely wrong). To install Xcode and the underlying command-line tools which are used by homebrew (something I’ll mention later in another post), do the following: 1) Install xcode from the app store.

Continue reading ↦