Tuesday, December 4, 2012

Solaris Interview Questions

The most widely used question are based on real scenario which questioner already has been faced so ready to thrill with your presence of mind while answering it.

Here we started by PART 1 :BASIC Questionary

Q: Describe "drwxrwxr-x " in ls -l output?
A: d denotes directory after that divide these 9 into set where as first rwx denotes permission for user and then again rwx denotes permission for group and r-x denotes permission for others.

r, w and x denotes as:
r    read
w   write
x    execute

Q: How to check if your system is 32 bit or 64 bit?
A: isainfo  -kv  or isalist  command show the what model kernel is running.
In isalist if it shows sparcv9 then it's 32-bit and if shows ULTRASPARC then it's 64-bit.

Q: How disable telnet service in Solaris 9 and Solaris 10?
A: In Solaris 9:

In /etc/inetd.conf

Make # entry in below line
telnet  stream tcp nowait root /usr/sbin/tcpd/in.telnetd
Save file then start service as below
#cd /etc/rc.d/init.d
#./inet reload
OR Kill -HUP PID

In Solaris 10:


In /etc/default/login file set login related setting as commented # over line "CONSOLE=/dev/console" as to disable root login by telnet(rlogin)

#svcadm disable telnet
OR
#inetadm -d telnet


Q: How to enable ssh service in Solaris 9 and Solaris 10 for root user only?
A: In Solaris 9:
#/etc/init.d/sshd stop

In Solaris 10:
#svcadm enable ssh and edit file /etc/ssh/sshd_config and change entry as "yes" for "Permitrootlogin"

#inetadm -e ssh

Q: How to check which all ports open in current system in Solaris 10?
A: #netstat -an | grep LIST

Q: How to check number of process running in Solaris 10?
A: ps -ef


Q: How to find which process have which Parent?
A: ptree command (Print the process trees containing the specified pids or users, with child processes indented from their respective parent processes. An argument of all digits is taken to be a process-id, otherwise it is assumed to be a user login name.Default is all processes.)

Q: What is setuid, setgid and Sticky bit?
A:
The Setuid (set-user identification) permission is set on an executable file, a process that runs this file is granted access based on the owner of the file (usually root), rather than the user who created the process. This permission enables a user to access files and directories that are normally available only to the owner.

The setgid (set-group identification) permission is similar to setuid, except that the effective group ID for the process is changed to the group owner of the file and a user is granted access based on permissions granted to that group.

The sticky bit can be set for file or directory ,as set on a directory is a permission bit that protects files within that directory. If the directory has the sticky bit set, only the owner of the file, the owner of the directory, or root can delete the file. The sticky bit prevents a user from deleting other users' files from public directories


For More information please visit :http://docs.oracle.com/cd/E19683-01/816-4883/secfile-69/index.html


More to coming soon....