Results tagged “SystemAdministration” from aaronlongwell.com

So I don't forget. On Leopard, there's a VPN setting called "Send all traffic over VPN connection." In theory, unchecking this box will make only connections to VPN-related IP addresses go over the VPN. This doesn't always work. The reason was explained by "Frank" on a comment to this post:

On Leopard there is a checkbox which enables or disables setting of the default route via the VPN. It is in the advanced settings and called something like "Send all traffic through the VPN".

HOWEVER, this only works if the order of the network configurations ("Ethernet", "AirPort", "Firewire", ...) is so that your VPN comes AFTER the interface you're connected to the internet. You can change the order by clicking on the little cog icon next to the +/- icons.

If your VPN comes before the Ethernet or AirPort then the default route will always be set to the VPN regardless of whether you ticked that little checkbox.

:) But wait - there is more.

For each VPN connection you can configure DNS servers. Those are only configured in the /etc/resolv.conf when the VPN connection is sorted above the Ethernet and not below.

So the net result is: You can have VPN with properly configured DNS servers but the default route will always be the VPN

OR

you have the VPN without the default route via the VPN but also no DNS.

This makes perfect sense... but it's not entirely intuitive in the OSX dialog.

By the way, if you happen to still be on Tiger. The above-referenced post itself provides the script-centric method to get the same effect on Tiger.

tagged with: OSX Routing SystemAdministration VPN

So you've prepared a directory of files you want to transfer to someone else. Being a command-line guru, you decide to use tar. After tarring up the files and extracting them elsewhere, you find that there are mysterious additional files inside the tarball. Every single file has a "ghost twin" named identically except for a ._ (dot underscore) prefix.

For a long explanation, see this Ars Technica article. For the short answer, see below.

On Leopard

prompt> COPYFILE_DISABLE=true tar -czvf YourTarFileName.gz DirectoryToTar/

On Tiger

prompt> COPY_EXTENDED_ATTRIBUTES_DISABLE=true tar -czvf YourTarFileName.gz DirectoryToTar/

Of course, if you always want these features disabled, you could just add this to your ~/.bash_profile file.

# For Tiger
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true

# For Leopard
export COPYFILE_DISABLE=true

tagged with: Annoyances Leopard MacOSX SystemAdministration tar

I've found Cygwin to be the best method for setting up an SSH server on Windows. This is partly due to the need for Cygwin for other purposes (rsync, cron, shell scripts, etc).

To set it up, first install Cygwin, including the OpenSSH package. Then run the ssh host setup command.

ssh-host-config

This command should result in several prompts. Answer yes, yes, yes. To each question. Then use ntsec tty for the CYGWIN= variable.

After the installation script completes, you can start the sshd daemon with the Windows net command.

net start sshd
tagged with: Cygwin SSH SystemAdministration Windows

Your /etc/passwd file can sometimes become disorderly as users come and go on a system. This simple script displays the file sorted numerically by the uid field.

sort -t : -k 3,4 -g /etc/passwd

The -t option identifies the field separator. In this case we use the colon (:). The -k 3,4 option determines the order in which fields will be compared for the sort. We're sorting by the 3rd field (UID) followed by the 4th field (GID). Lastly, the -g option means we want the sort to occur numerically. This makes the number 56 appear after 9. Using the default (ASCII) sort places 56 before 9 (5 comes before 9).

This variation sorts the group file by the group id (GID) field.

sort -t : -k 3 -g /etc/group
tagged with: Bash Linux ShellScripting SystemAdministration

Who's this guy?

Aaron Longwell is Chief Web Craftsman at New Media Logic Corporation in Coeur d' Alene, Idaho. As a professional software developer for 12 years and a student of public policy, he occasionally has interesting things to say about software, technology, culture and politics.

Subscribe to feed Subscribe to my RSS Feed