How to create a Solaris Flash Archive (Flar)

October 22, 2009

A solaris filesystem can be copied into an flash archive. This archive can then be used to install the Solaris OS on another system. Installation through flar is fast and efficient.

The format of the command is as follows:

# flarcreate -n name options path/filename

The name that you give the archive.

For a description of options, see The flar Command.

The path to the directory in which you want to save the archive file. If you do not specify a path, flarcreate saves the archive file in the current directory.

The name of the archive file.

So for example I wan to create a flar with the name Solaris9 and the filename as myarchive.flar, the command will look like as mentioned below:

# flarcreate -n solaris9 -c myarchive.flar

where -c is an option to create compressed flar.

See the manpages for more options.


How to configure telnet to login as root

September 23, 2009

By default, telnet is enabled to be access by remote logins for a non-root user. To allow a root user to access the telnet remotely you will have to explicitly allow it.

This can be done by commenting the following line in the file /etc/default/login:

# CONSOLE=/dev/console

But please understand the security threat behind this, first telnet is insecure and hence is not suggested method of remote access, instead use SSH. Besides allowing remote login for root via telnet is a big NO NO.

You’ve been warned!

How to Track Users on Solaris

June 20, 2009

So you want to check who have ever accessed your Solaris system. Tracking or monitoring users on a system is quite an important part of ‘Solaris Adminstrators’ role.

There are two parts to it:

– Who is currently logged in

– Who has previously accessed this machine

To the details of users who are currently logged in to the system, fire the following command:

# who

This gives the limited details of the user logged in. If you also want to know who is running what program, there is another command:

# w

But this is only about the users who currently logged in to the system. What about if they logged out some time back. Or if they used your system when you were not monitoring? No worry …

# last

This command records all login and logouts. So you may have to use more or less to control the output.

There is one more log that keeps record of user switching. So if anybody has used su command to swith to some other user it will keep a log of it under /var/adm/sulog. You can cat this file to see the output.

# cat /var/adm/sulog

SU 06/26 16:25 + syscon root-root

SU 06/26 17:39 + syscon root-root

SU 07/02 11:11 + console root-sysadmin

SU 07/02 11:19 + console root-mgreen

SU 07/07 09:11 + pts/1 sysadmin-root

SU 07/08 10:45 + pts/4 testuser-root

So if somebody logged in as root directly then it would come under last command and if someone is logging in as normal user but later switching to root with ‘su’ command you can check that in the sulog.

Now you have complete information of users logging in to your system.