How to Recover Solaris 8 Root Password

August 7, 2007 – 7:37 pm
Tip courtesy of Kyle Reynolds at http://www.camelrichard.org To recover root password    1. Boot with Solaris 8 CD
   2. ok> boot cdrom -sw
   3. # csh
   4. # setenv TERM sun or
   5. # export TERM=sun or #export TERM=vt100
   6. # mount /dev/dsk/c0t0d0s0 /a (for Ultra)
   7. # vi /a/etc/shadow   (before modification)   root:ngrxB0Eg8CHUU:9974::::::
       ^^^^^^^^^^^^^   (after modification)   root::9974::::::   :wq!    8. # reboot

How to Create a Virtual IP in Solaris

August 7, 2007 – 7:36 pm
 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org 1) create /etc/hostname.<interfacename>:<n> containing the hostname of the virtual IP         example:         /etc/hostname.hme0:1 2) add the hostname and virtual IP to /etc/hosts 3) use the following commands to configure the interface:    ifconfig <interfacename>:<n> plumb         example:         ifconfig hme0:1 plumb    ifconfig <interfacename>:<n> <IP address> netmask <netmask> broadcast + up         example:         ifconfig hme0:1 10.67.1.141 netmask 255.255.255.0 broadcast + up

How to Create a Solaris Boot Device Alias

August 7, 2007 – 7:32 pm
 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org Step 1: ok probe-scsi-all Step 2: ok show-disks Step 3: Set boot-device Method 1: OBP ok nvalias    eg.    ok nvalias disk2 /iommu@f,e0000000/sbus@f,e0001000/esp@f,800000/sd@3,0:a    ok nvalias disk2 /pci@1f,0/pci@1/scsi@3,1/disk@3,0 ok setenv boot-device disk2 ok reset Method 2: nvedit ok nvedit 0: devalias disk2 /iommu@f,e0000000/sbus@f,e0001000/esp@f,800000/sd@3,0:a ^c (control c) ok nvstore ok setenv use-nvramrc? true ok reset Method 3: Using the existing device alias ok devalias ok setenv boot-device ok printenv boot-device ok reset

Force Full Duplex

August 7, 2007 – 7:27 pm
 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org (for V-series, no entry in /etc/system) bge0: (no entry in /etc/system: add this script to rc2.d) S68net-tune ################################################ #!/sbin/sh # /etc/rc2.d/S68net-tune PATH=/usr/bin:/usr/sbin echo "Implementing Solaris ndd Tuning Changes " # bge-Interfaces # bge-Interfaces # Force bge0 to 100fdx autoneg off ndd -set /dev/bge0 adv_1000fdx_cap 0 ndd -set /dev/bge0 adv_1000hdx_cap 0 ndd -set /dev/bge0 adv_100fdx_cap 1 ndd -set /dev/bge0 adv_100hdx_cap 0 ndd -set /dev/bge0 adv_10fdx_cap 0 ndd -set /dev/bge0 adv_10hdx_cap 0 ndd -set /dev/bge0 adv_autoneg_cap 0 ################################################ ce0: (no entry in /etc/system: add this script to rc2.d) S68net-tune ----------- #!/sbin/sh # /etc/rc2.d/S68net-tune PATH=/usr/bin:/usr/sbin echo "Implementing Solaris ndd Tuning Changes " # ce-Interfaces # ce-Interfaces # Force ce0 to 100fdx autoneg off ndd -set /dev/ce adv_1000fdx_cap ...

Solaris Disk Quotas

August 7, 2007 – 7:26 pm
 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org  Disk Quotas under Solaris ************************* Create a quotas file (on root of filesystem): --------------------------------------------- # /usr/bin/touch quotas # /usr/bin/chmod 600 quotas Display user's quota on all mounted file systems where quotas exist: ------------------------------------------------------------------- # quota -v username which will output something similar to this: Disk quotas for user1 (uid 1175): Filesystem usage quota limit timeleft files quota limit timeleft /var/spool/mail 0 3072 5144 1 0 0 /home 1377 3072 5144 146 0 0 /tmp 0 1024 1024 0 0 0 Set or reset disk quota for users: ********************************** Set disk quota for a user: -------------------------- # /usr/sbin/edquota username The editor invoked is vi ...

Discover Global Zone Name from Local Zone

August 7, 2007 – 7:25 pm
 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org from the local zone, run: arp -a | grep SP example: # arp -a | grep SP bge1 zone1.domain.com 255.255.255.255 SP 00:03:ba:51:37:8e bge0 host1.domain.com 255.255.255.255 SP 00:03:ba:51:37:8d bge1 zone2.domain.com 255.255.255.255 SP 00:03:ba:51:37:8e bge2 zone3.domain.com 255.255.255.255 SP 00:03:ba:51:37:8f

Disable FTP

August 7, 2007 – 7:19 pm
 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org Enable/Disable FTP in: /etc/inetd.conf uncomment/comment line: ##ftp stream tcp6 nowait root /usr/sbin/in.ftpd in.ftpd start/stop: /etc/init.d/inetsvc start /etc/init.d/inetsvc stop reverse process to disable To Disable/Enable ftp in Solaris 10: -------------------------------------- svcadm disable ftp svcadm enable ftp

Directing Solaris Tar to Extract to Current Directory

August 7, 2007 – 7:16 pm
Tip courtesy of Kyle Reynolds at http://www.camelrichard.org If a tarball includes the full path, use the following command to extract
it to the current directory instead of the full path: pax -rv -f filename.tar -s ',^/,,'

Creating Solaris Packages

August 7, 2007 – 7:14 pm
Tip courtesy of Kyle Reynolds at http://www.camelrichard.org Creating Solaris Packages
-------------------------
(This is certainly not the ONLY way to do this, so I'll just show you how I did it, and you
can investigate the other ways and decide which one works best for you...  Here are a few
links)
http://www.ibiblio.org/pub/packages/solaris/sparc/html/creating.solaris.packages.html
http://www.sunfreeware.com My version is basically a composite of the above two methods. First, create a directory structure to house the build files for your packages: mkdir /u01/app/build
mkdir /u01/app/build/config             - will house the config files for the package
mkdir /u01/app/build/package            - will house the final package
mkdir /u01/app/build/pkgtmp             - will house the temporary ...

Creating a Zone in Solaris 10

August 7, 2007 – 7:00 pm
Tip courtesy of Kyle Reynolds at http://www.camelrichard.org ------ Creating a Zone in Solaris 10 ------
------------------------------------------- To view a list and status of currently installed zones:
------------------------------------------------------ # zoneadm list -vi   ID NAME             STATUS         PATH                         
   0 global           running        /
   1 jumpstart        running        /u01/zones/jumpstart To create a new zone:
-------------------- # zonecfg -z <zonename>
     (if the zone has not been configured at all previously, you will receive: <zonename> No such zone configured
Use 'create' to begin configuring a new zone.
                                                                              )
a full example of zone creation for a zone called 'zone1':
--------------------------------------------------------- # zonecfg -z zone1
zone1: No such zone configured
Use 'create' ...