Main

Solaris Archives

January 30, 2002

NIS tips

useful stuff for getting solaris to be a nis client - ypinit for the setup stuff, and ypstart to start the client up (ypbind)

February 2, 2002

Static routing entries in Solaris

routing table additions on Solaris can be put in /etc/init.d/inetsvc so they happen at system startup. see bottom of file for examples.

Update - Actually, this is a crap place to put the entries as patches and OS updates can overwrite it (despite that I still see it a lot). A much better way is to add a staticrouting script to /etc/init.d/ looking something like this:

#!/sbin/sh
#
# Script   - staticroutes.sh
#
case "$1" in
'start')
    # Route for XX
   /usr/sbin/route add 10.11.12.0/24 10.11.12.1
   # Route for YY
   /usr/sbin/route add 172.16.0.0 -netmask 255.255.0.0 172.16.0.1
   ;;
'stop')
    # Route for XX
   /usr/sbin/route delete 10.11.12.0/24 10.11.12.1
   # Route for YY
   /usr/sbin/route delete 172.16.0.0 -netmask 255.255.0.0 172.16.0.1
   ;;
*)
   echo "Usage: $0 { start | stop }"
   exit 1
   ;;
esac
exit 0

March 21, 2002

ring vs tube

when does a ring become a tube? is a tube a long ring? is a ring a short tube?

April 4, 2002

date

to set date on solaris eg 040218122002

May 4, 2002

don't understand unix

'Those who do not understand Unix are condemned to reinvent it, poorly.' -- Henry Spencer

July 11, 2002

mailing attachments from command line

to send attachments from the command line -
uuencode (filename) (filename) | mailx (address)

August 10, 2002

!frames

excellent page on why not to use frames - http://www.html-faq.com/htmlframes/?framesareevil

August 23, 2002

regexp return only match

useful command line perl for doing a grep but only returning the matched string, not the whole line:

cat filename | perl -ne 'if($_ =~ /regexpr/) { print('$&
');}'

can't help thinking you should be able to do this with grep...

August 24, 2002

what cpu?

one way of finding out what type of processor your Sun machine has (assuming you are running Solaris) :

# psrinfo -r

September 10, 2002

no nis

to ensure NIS doesn't start automatically on a Solaris machine, rename /usr/lib/netsvc/yp/ypbind to something like /usr/lib/netsvc/yp/ypbind.orig. why isn't there an rc script to stop/start/disable it?

October 7, 2002

modem commands

those damn modem commands you can never remember - http://www.modems.com/glossary/extend2b.html

October 25, 2002

disable nis

to disable NIS (ypbind) from starting on a Solaris machine, just rename -

/usr/lib/netsvc/yp/ypstart

to something else.

November 30, 2002

rm -

trying to rm that file with a '-' at the start of its name? :

rm -- -foo

where -foo is the filename. apparently -- tells rm not to treat the rest of the arguments as parameters. i'm also told that this works for other common UNIX commands, cp etc.

December 18, 2002

allow users chgrp

solaris - how to allow users to chgrp (and presumably chown) files to other users -

in /etc/system :
set rstchown = 0

January 25, 2003

FreeBSd 5.0

this entry is testimony to the fact that FreeBSD 5.0 RELEASE is at least stable enough to get Gnome going and Mozilla. Just about to have a go at Evolution.

February 4, 2003

spain's ID card

interesting article in the Independent about Spain's ID card system.

February 24, 2003

/etc/nologin

neat. existence of this file means that non root users are prevented from logging in, even from the console. instead the contents of the file are displayed.

February 26, 2003

mounting an ISO

mounting an ISO image file in Solaris 8:

# /usr/sbin/lofiadm -a /path/to/iso/file /dev/lofi/1
# mount -F hsfs /dev/lofi/1 /path/to/mount/point

don't forget to remove the lofi device after you unmount:

# umount /path/to/mount/point
# /usr/sbin/lofiadm -d /dev/lofi/1

# man lofiadm

for more details

FreeBSD equivalent is nicely documented in the handbook.

March 8, 2003

crazy nights

the Melbourne Symphny Orchestra recently accompanied Kiss in concert. ridiculous, but i wish I'd been there.

March 21, 2003

NIS info

useful doc at sun packed with information about nis - http://docs.sun.com/db/doc/806-1387/6jam692c8?a=view

March 29, 2003

City creator

Build your own eboy style cities with City Creator

April 3, 2003

Stop STOP-A

Disable (and I suppose re-enable) STOP-A mechanism on a Sun/Solaris machine - http://www.netsys.com/sunmgr/1999-04/msg00041.html

September 10, 2003

I was walking past one

I was walking past one of those soap box speakers in Leicester square a while back just as he had asked a question of the crowd. I didn't hear what the question was, but I did hear that he was asking people to put their hand up if they agreed. I saw nobody with their hand up so I thrust mine into the air, and waved it a little for good measure. He looked rather disgruntled as he noticed me, then waved his hand in my direction and said something like, ok so we have one person who agrees, BUT STILL! I walked off at that point. I've wondered since what I'd actually agreed to, but I like to think that I helped create a slightly more balanced view of whatever it was.

September 13, 2003

Hayao Miyazaki

Hayao Miyazaki has outdone himself with Spirited Away, what an incredible imagination. This puts the normal Disney output to shame, making it look bland and boring (and no awful Phil Collins soundtrak either). I've been a fan of Miyazaki ever since I saw Crimson Pig and Lupin III a few years ago.

September 18, 2003

JASS

Recently discovered - JASS, Sun's own Solaris hardening scripts. They look pretty thorough, and fit nicely into the Jumpstart mechanism.

September 22, 2003

iTerm

iTerm is a replacement for the standard OSX terminal application. It is faster (doesn't make it seem you are typing through treacle), has tabs, bookmarks, and is generally pretty cool.

September 24, 2003

dtterm witout menu bar

At last, simple when you know how :

dtterm -xrm *menuBar:False

This makes use of X resources. You could also put the resource in your default .XResources file.

October 2, 2003

syslog.conf gotcha

Tai Chi is great for focussing the mind, except today I was still focussed on why my syslogger wasn't logging anything and not concentrating on my 'grasp sparrow's tail'. Then I remembered the syslogger's main gotcha - spaces. Solaris' syslog daemon has trouble parsing config lines with space delimiting fields. Replace with tabs and it all works fine. Stupid really, it's the sort of thing that could make a real mess of your 'wave hands like clouds' if you couldn't figure it out.

August 2, 2004

Sun Solaris screen resolution

Some instructions on how to change the screen resolution / colour depth on a Sun machine - http://www.unixgods.org/~tilo/sun_resolution.html

May 18, 2006

cssh

I've been looking for a way of multiplexing several ssh sessions. By that I mean the ability to type once, and the result happens in x ssh sessions. Thanks to someone on the FreeBSD UK user list I came across cssh (http://freshmeat.net/projects/cssh/). This does pretty much what I need, and so far I've had no problems with it.

What would be ideal though is functionality built into the window manager to do the same thing, so I 'tag' any number of windows, even varying applications, and my keyboard input, (maybe even mouse) is copied to all windows. For instance I could be typing into 3 ssh sessions and an instance of vi to record my typing.

July 7, 2007

Solaris - Copy whole partition

Discovered a new way to copy a whole partition in Solaris:

ufsdump 0f - /dev/rdsk/d1 | (cd /mnt/d1 ; ufsrestore xf -)

where:

/dev/rdsk/d1 is the raw device, must be unmounted

/mnt/d1 is the destination for the data

About Solaris

This page contains an archive of all entries posted to numbersix in the Solaris category. They are listed from oldest to newest.

FreeBSD is the previous category.

art is the next category.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33