New Solaris Administrators Blog

We are proud to announce our new site: http://blog.serversolaris.com/

Solaris Server Administrators and Security

↑ Grab this Headline Animator

martes, 17 de junio de 2008

Presentation of the Solaris operating system


The UNIX (r) operating system was developed by AT&T Bell Labs in 1969, it was created as a combination of tools by developers for developers.

The developers of the California Berkeley did modifications to the original source code, and it was called Berkeley Software Distribution (BSD) Unix. The most important contribution from the Berkeley developers was the network software, this meant an important improve to the operating system.

The original version from SUN Operating System as known as SunOS, based in BSD Unix v4.2. In that moment the version from AT&T Unix was known as System V. In 1988, BSD, AT&T Unix and other operating system where combined and from that effort appeared System V v4.0 (SVR4) Unix, this effort also created an standard for the operating systems sector. The new SVR4 where converted in the base not only for Sun OS, but also for AT&T Unix, AIX from IBM and HP-UX from Hewlett-Packard.

jueves, 21 de febrero de 2008

Disabling services in Solaris 10

To disable a service you have to be root or have a sudo, for example, i want to disable nfs:

-bash-3.00# svcs | grep nfs
online 16:29:25 svc:/network/nfs/status:default
online 16:29:29 svc:/network/nfs/mapid:default
online 16:29:44 svc:/network/nfs/nlockmgr:default
online 16:32:55 svc:/network/nfs/rquota:default
online 18:49:36 svc:/network/nfs/server:default

I will disable the nfs server:
# svcadm disable network/nfs/server

miércoles, 30 de enero de 2008

Sharing directories with NFS in Solaris 10

You want to share a directory in Solaris, may be, the home of the users, or a directory with binaries.
With svcs the service status can be checked, so lets check the status of the nfs server:
-bash-3.00# svcs network/nfs/server
STATE STIME FMRI
offline 2:19:03 svc:/network/nfs/server:default

The service is offline, so you have to enable it and start it, lets do it:
-bash-3.00# svcadm enable -r network/nfs/server
-bash-3.00# svcadm enable -s network/nfs/server
-bash-3.00# svcadm restart network/nfs/server

Now it is started:
-bash-3.00# svcs network/nfs/server
STATE STIME FMRI
online 2:29:51 svc:/network/nfs/server:default

Now, to share a directory, edit /etc/dfs/dfstab and add:
share -F nfs /export/test

Save the file and execute:
# shareall -F nfs

Now check the shares:
-bash-3.00# share
- /export/test rw ""

Quiet simple ;-)

miércoles, 2 de enero de 2008

Disable graphical login in Solaris

If you want to start solaris in text mode, it is easy:
-bash-3.00# /usr/dt/bin/dtconfig -d

The reboot ;-)

Modifying the ip address of a Server

To modify the ipaddress permanently you have to edit the file:
/etc/hosts or /etc/inet/ipnodes (which is a link to /etc/hosts).

And set there the hostname and the IP address like:
127.0.0.1 localhost
10.10.10.20 solln

Then you have to reboot. You can also change it with ifconfig (like in Linux), first obtain the ethernet card address:
-bash-3.00# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843 mtu 1500 index 2
inet 10.10.10.21 netmask ff000000 broadcast 10.255.255.255
ether 0:c:29:2d:30:5

Then, carefully, modify the address:
# ifconfig e1000g0 10.10.10.20

You will probably loose the connection if you are doing this remotely, so, again, at your own risk.

Creating users in a Solaris Standalone server

In Solaris > 7 if you are going to use it without the NFS, when you want to create a user you may see this error:
# useradd -c "Walter" -m -s /bin/ksh -d /home/walter walter
ERROR: Unable to create the home directory: Operation not applicable.

To stop automount to mount the /home partition edit /etc/auto_master and comment the line
# /home auto_home -nobrowse

Then run "automount". And create your user.

How to reboot or shutdown a Solaris Server

When you have to reboot a Solaris you can use multiple commands as root user.

To reboot:
This command will not ask, you can interrupt it with ^C:
$ reboot

$ shutdown -i6 -g0
-i6 turns to State 6, the state 6 stops the operating system and reboots to the state defined by the initdefault entry in /etc/inittab.
-g0 permits to set a period to shutdown, the default is 60 seconds.
-y would not ask you for Y/N before rebooting.

To shutdown
$ shutdown -i5 -g0
This turns the machine into state 5, which means a state in which the machine can be turned off, and it turns the machine off.

$ poweroff