Friday, August 12, 2011

NIS & Automount


# vi /var/yp/etc/auto_home
# cd /var/yp
# make auto.home


To flush the old mapping on the client server:


# automount -v

Monday, August 01, 2011

Spark Timezone

To correct the timezone in Spark, create a Spark.vmoptions file (not spark.vmoptions and not Spark.vmoptions.txt) beside the Spark.exe and add this to it:

-Duser.timezone=Europe/London

then restart Spark.

Thanks to:

Comand line wrapping

If you're having trouble on Solaris with your command line wrapping at 80 characters so it starts printing again at the start of the line...
Have you logged in via a jump server and have your terminal settings configured in the first machine, which is controlling what the second machine can send back?

Tuesday, June 14, 2011

Microsoft Natural Keyboard Function Keys...

Did you know the natural keyboard 4000 has a "F-Lock" key?

http://www.ehow.com/how_6777639_enable-function-keys-microsoft-keyboard.html

Open a program that uses the function keys such as Microsoft Word or Microsoft Excel. Check your keyboard for an "F-Lock" or "Function Lock" key. This key is used to toggle function-key support; when it is toggled on, the function keys will not work.

Monday, June 13, 2011

Windows hosts file ignored

If you have already tried all of these things:

http://mihaiu.name/2005/windows-hosts-file-ignored/

If you've copied the file from somewhere else rather than opening it and pasting in entries, check the permissions on the file.
The file permissions could be wrong meaning Windows will not read it.

More reading:

http://www.bleepingcomputer.com/tutorials/tutorial52.html

Wednesday, June 01, 2011

Why does ifup eth1 make eth0 stop working?

and this was a gotcha that stole a couple of hours...

Answer... it didn't stop working, I just couldn't see it...
bringing up eth1 when I'd cloned eth0's config:


/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth1


and neglected to remove this line:


GATEWAY=AA.BB.CC.DD


When eth1 came up after eth0, it would over-write the default route.
I realised what the problem was when I noticed that a terminal logged in from another host on the same subnet was still working, the one I'd been using from my desktop was being disconnected - the default gateway was obviously missing or wrong.

Before (bad):


# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.98.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
172.16.98.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 192.168.98.98 0.0.0.0 UG 0 0 0 eth1



# route add default gw 172.16.98.1


suddenly it starts working again...


# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.98.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
172.16.98.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 172.16.98.1 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 192.168.98.98 0.0.0.0 UG 0 0 0 eth1


But really we want:


# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.98.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
172.16.98.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 172.16.98.1 0.0.0.0 UG 0 0 0 eth0

Two things I learned today...

One, was (by fluke) that ^Y suspends a process like ^Z does... although it waits until the process wants to read input from the terminal before it suspends it... I guess that could be a useful criteria in some situations... I can probably think of other more useful things that could be implemented as built-in features though :-)

http://www.gnu.org/software/bash/manual/bashref.html#Job-Control-Basics


and the second was...

Monday, May 09, 2011

Uploading an ISO in vSphere Client

On http://communities.vmware.com/thread/258207, RParker says:

"But you shouldn't be uploading ISO to the datastore anyway, users can mount ISO from their client, or you can create an NFS store, and connect your ESX hosts to it."

But...

Select your host.
Click on the "Storage Views" tab (grey tab on the far right at the top)
Click on a Datastore in the list.
In the explorer pane list on the left you will get a list of the datastores.
Right Click on the one that you want, and click "Browse Datastore..."
In here you can create new folders, upload new files & delete files from disk.

Then you can connect to them as if they're a DVD drive.

Friday, May 06, 2011

Entry for local iso in /etc/apt/sources.list

deb file:///mnt/ubuntu-iso jaunty main restricted

(This was an Ubuntu BSD box and the iso was mounted under /mnt/ubuntu-iso)

http://ubuntuforums.org/archive/index.php/t-35807.html

Friday, April 08, 2011

Turning off Passive mode in FTP

Curl:


curl -O -P- ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/xz-5.0.1-sol10-sparc-local.gz


From the cURL man page here: http://curl.haxx.se/docs/manpage.html#-P--ftp-port

or you can add:


-P-


to your ~/.curlrc

For lftp you can add this to ~/.lftprc:


set ftp:passive-mode off


Or just type the same command at the lftp prompt if you only want it for the current session.