Friday, April 18, 2008

Solaris FAQ

1) to change welcome message
cd /etc

and change motd file (message of today)

# more motd
Sun Microsystems Inc. SunOS 5.9 Generic May 2002


2)to change PATH, SUPATH variable setting for top and tcpdump

change /etc/default/login file

PATH=/usr/bin:/usr/sbin/:/opt/sfw/bin:/opt/sfw/sbin
SUPATH=/usr/sbin:/usr/bin:/opt/sfw/bin:/opt/sfw/sbin

for super user change /etc/default/su file with
SUPATH=/usr/sbin:/usr/bin:/opt/sfw/bin:/opt/sfw/sbin

3)When you create a user using command line it does not allow you to login to GUI ?

To solve the problem you need to create home directory and make sure it is writable by that user because while login
to GUI it creates .dtprofile, .TTauth etc. files.

4) System logs can be checked in /var/adm/messages file

5)
As of fairly recently patched versions of Solaris and new releases e.g. version 9 onwards, pkgadd seems to be more security conscious. Thus when a pkg is added pkgadd looks for the user install to install the package as and if it doesn't find it then performs the install as user nobody.


To fix this, as root, create a user called install by adding the following into /etc/passwd:

install:x:0:1:installation user:/:/bin/true

then run pwconv on the command line.

N.B.: the user install must have the same uid and gid as root.


7) command to find which Operation System your Solaris box is running

# uname -a
SunOS cypher 5.8 Generic_108528-15 sun4u sparc SUNW,UltraSPARC-IIi-cEngine


8) command to find whether solaris is 64bit or 32bit

/usr/bin/isainfo -kv

output will be like following
64-bit sparcv9 kernel modules


9) disable/enable ftp on solaris box

vi /etc/inetd.conf

comment following line
#ftp stream tcp6 nowait root /usr/sbin/in.ftpd in.ftpd

and send HUP signal to inetd process to take effect.

# ps -ef|grep inetd
root 150 1 0 13:59:32 ? 0:00 /usr/sbin/inetd -s
# kill -HUP 150


This is singam's blog. For more articles visit at http://singam15.blogspot.com

No comments: