Monday, November 24, 2008

Backup Interview questions

Q)How to create backup by ufs dump

A)ufsdump –0(zero)cvf /dev/rmt/0 /naveen

How to list the files

Ufsrestore –tvf /dev/rmt/0
Ufsdump –uvf /dev/rmt/0 /naveen – to updates
Ufsrestore –ivf /dev/rmt/0 /naveen

Q)How to back up using tar

A)Tar –cvf /dev/rmt/0 /naveen - copy
Tart –tvf /dev/rmt/0 - Extract
Tar –uvf /dev/rmt/0 /naveen - Update
Tar –xvf /dev/rmt/0 /naveen - Extract

Wednesday, November 12, 2008

NIS Interview questions and answers

How to create a nis master

#Echo > /etc/defaultdomain
#Vi /etc/hosts
Sun2 add all the host connected to the network

#Cp /etc/nsswitch.nis /etc/nsswitch.conf
#Vi /etc/nsswitch.conf
File nis – add this entry

#Cd /var/yp
#Ypinit –m – master server
Enter host
Stop at errors say no here

#Cd /var/yp

Here you can see all the deamon get restarted .

Q)which command display the default nis server

Q)which command will display all the master and slave servers
A)Ypcat –k ypservers

Q)how to see the nis users
A)Ypcat passwd

Q)what are the deamons for nis master
A)Ypserv ypbind ypxfrd rpc.ypassword rpc.ypupdates.

Q)what is map
A)Map is table which consist of a key and a file which consist of the information of the key

Q)how to create nis slave server(

#Vi /etc/host
Sun1 master server ip

#Cp /etc/nsswitch.nis /etc/switch.conf
#Vi nsswitch.con
Files nis

#Echo> /etc/defaultdomain or to maintain more security /var/yp/ypservers

#Cd /var/yp
#Ypinit –s sun1 (master server)
Yes give master server ip or hostname
Error say no

#Cd /var/up if u r in that directory then its okay
Ypserv ypbind

#Ypwhich – will display master and slave servers
#Ypcat –k ypservers – list master and slave server

Q)what are the daemon for nis slave server
A)Ypserv ypbind

Q)how to see nis user from the slave
A)Ypcat passwd

38)how to configure nis client

#Vi /etc/hosts
Sun1 - master
Sun2 – slave

#Cp /etc/nsswitch.nis /etc/nsswitch.conf
#Echo > /etc/defaultdomain or /var/yp/ypservers

#Cd /var/yp
#Ypinit –c
Add the slave if available or master
No at errors

#Cd /var/yp

Daemons for nis clients are ypbind

Q)To see nis server and master from the client
A)Ypcat –k ypservers

Q)how do you update slave servers from the master
A)Cd /var/yp
#/usr/ccs/bin/make passswd
Or yppush.

Q)how to create nis+ server and client
#Cp /etc/passwd /export/home/nisfiles
#Cp /etc/group /export/home/nisfiles
#Cp /etc/hosts /export/home/nisfiles

#Vi auto_master
Remove all entries and keep only user name home directories

#cp /etc/nsswitch.nis /etc/nsswitch.conf
Files nisplus


#nisserver –r –Y
#cd /export/home
#nspopulate -v –F

Q)how to create nis+ client

#cp /etc/nsswitch.nis /etc/nsswitch.conf
Files nisplus


#nisclient –I –h –d

Listing table & objects in NIS+
• #nisls ;Gives the total objects in NIS+
• #nisls org_dir ;Lists the tables listed in the directory.
Listing a contents of tables
• #niscat passwd.org_dir
Listing table structure
• #niscat -o passwd.org_dir ;lists structure of password table.
Adding A user
• #nistbladm -a name=john uid=123 gid=111 home=/home/john shell=/bin/sh passwd.org_dir
Changing the user information in passwd table (Super user only
Fill in the corresponding values in <>
• #nistbladm –a name=<> passwd=<> uid=<> gid=<> home=<> shelll=<> passwd.org_d
• #nistbladm -a name=john uid=123 gid=234 home=/home/john shell=/bin/sh passwd.org_di
to change only shell
• #nistbladm -m shell=/usr/local/bin/bash [name=john],passwd.org_dir
Changing user passwd

As root
• # nispasswd ;user has to update his key through

chkey -p
As user
• $ nispasswd ;update encrypted key
• $chkey -p ;(user NIS+ passwd and login passwd are the same.)

Adding user credentials
• #nisaddcred -p 123 -P john local
• # nisaddcred -p -P des
123 is userid and john is the user name.
Adding / removing a user dir entry in auto_home table :
• #nistbladm -a key=john value= auto_home.org_dir
• #nistbladm -r key=john auto_home.org_dir ;If key is not unique then more fields needs to be defined .
Removing a user
• #nistbladm -r name=john passwd.org_dir
Modifying the tables for multiple entries.
• #nisaddent -d passwd > /tmp/passwd ;Dump the table to a file
• #vi /tmp/passwd ;Edit the dumped file
• # nisaddent -r -f /etc/passwd passwd ;Put back the dumped file.
nisaddent command is available only for some of the standard tables, for others either nispopulate or nistbladm has to be used .

Sunday, November 9, 2008

User Administration solaris interview

Q)how to create a user

A)Useradd –u uid –g gid –d /export/home/naveen –m –s /bin/sh naveen

Q)whats are the files which maintain user informations


Q)fields in /etc/passwd

Q)fields in /etc/group

Q)fields in /etc/shadow
A)username:encrypted passwd-min-max-lastchange-inactive-warn-expire

Q)how to create a quotas
A)Cd /export/home
Touch quotas
Chmod u+rw quotas
Edquota naveen
Soft=5000 hard=6000 inodes=5000 inode=5500
Quotaon –v /export/home
Repqupota –v /export/home or quota –v naveen to see quota

Tuesday, November 4, 2008

User Administration solaris interview

How to breakroot passwd

#ok boot cdrom –s


Export TERM

Mkdir /demo

Mount /dev/dsk/c0t0d0s0 /demo
Vi /naveen/etc/passwd

Root:KHGHGHGGFG:-remove this junk passwd


Reboot it logins with out asking for passwd

# Passwd – enter new password.
Custom Search

Feeds from my other blog

Samsung S2 Brand new for 25900 White piece sealed box

For Sale, Mobile Phones - Accessories in India, Andhra Pradesh, Hyderabad. Date September 17

For Sale in Hyderabad