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
solaris interview questions and answers for all versions
Header Ad Banner
Monday, November 24, 2008
Wednesday, November 12, 2008
NIS Interview questions and answers
How to create a nis master
#Domainname sun.com
#Echo sun.com > /etc/defaultdomain
#Vi /etc/hosts
Sun1 192.168.0.1
Sun2 192.168.0.2 add all the host connected to the network
Wq!
#Cp /etc/nsswitch.nis /etc/nsswitch.conf
#Vi /etc/nsswitch.conf
File nis – add this entry
Wq!
#Cd /var/yp
#Ypinit –m – master server
Enter host 192.168.0.1
Stop at errors say no here
Yes-yes-yes
#Cd /var/yp
#/usr/lib/netsvc/yp/ypstop
#/usr/lib/netsvc/yp/ypstart
Here you can see all the deamon get restarted .
Q)which command display the default nis server
A)ypwhich
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(192.168.0.2)
#Vi /etc/host
Sun1 192.168.0.1 master server ip
Wq!
#Cp /etc/nsswitch.nis /etc/switch.conf
#Vi nsswitch.con
Files nis
Wq!
#Domainname sun.com
#Echo sun.com> /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
Yes-yes
#Cd /var/up if u r in that directory then its okay
#/usr/lib/netsvc/yp/ypstop
#/usr/lib/netsvc/yp/ypstart
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 192.168.0.1 - master
Sun2 192.168.0.2 – slave
Wq!
#Cp /etc/nsswitch.nis /etc/nsswitch.conf
#Domainname sun.com
#Echo sun.com > /etc/defaultdomain or /var/yp/ypservers
#Cd /var/yp
#Ypinit –c
Add the slave if available or master
Yes
No at errors
#Cd /var/yp
#/usr/lib/netsvc/yp/ypstop
#/usr/lib/netsvc/yp/ypstart
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
Host1 192.168.0.1:/export/home
Host2 192.168.0.1:/export/home
Wq!
#cp /etc/nsswitch.nis /etc/nsswitch.conf
Files nisplus
Wq!
#domainname sun.com
#echo sun.com>/etc/defaultdomain
#nisserver –r –Y
Reboot
#cd /export/home
#nspopulate -v –F
Q)how to create nis+ client
#cp /etc/nsswitch.nis /etc/nsswitch.conf
Files nisplus
Wq!
#domainname sun.com
#echo sun.com>/etc/defaultdomain
#nisclient –I –h 192.168.0.1 –d sun.com
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
example
• #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 unix.123@planet.com -P john.planet.com. 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=10.20.30.40:/home/john 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 .
#Domainname sun.com
#Echo sun.com > /etc/defaultdomain
#Vi /etc/hosts
Sun1 192.168.0.1
Sun2 192.168.0.2 add all the host connected to the network
Wq!
#Cp /etc/nsswitch.nis /etc/nsswitch.conf
#Vi /etc/nsswitch.conf
File nis – add this entry
Wq!
#Cd /var/yp
#Ypinit –m – master server
Enter host 192.168.0.1
Stop at errors say no here
Yes-yes-yes
#Cd /var/yp
#/usr/lib/netsvc/yp/ypstop
#/usr/lib/netsvc/yp/ypstart
Here you can see all the deamon get restarted .
Q)which command display the default nis server
A)ypwhich
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(192.168.0.2)
#Vi /etc/host
Sun1 192.168.0.1 master server ip
Wq!
#Cp /etc/nsswitch.nis /etc/switch.conf
#Vi nsswitch.con
Files nis
Wq!
#Domainname sun.com
#Echo sun.com> /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
Yes-yes
#Cd /var/up if u r in that directory then its okay
#/usr/lib/netsvc/yp/ypstop
#/usr/lib/netsvc/yp/ypstart
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 192.168.0.1 - master
Sun2 192.168.0.2 – slave
Wq!
#Cp /etc/nsswitch.nis /etc/nsswitch.conf
#Domainname sun.com
#Echo sun.com > /etc/defaultdomain or /var/yp/ypservers
#Cd /var/yp
#Ypinit –c
Add the slave if available or master
Yes
No at errors
#Cd /var/yp
#/usr/lib/netsvc/yp/ypstop
#/usr/lib/netsvc/yp/ypstart
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
Host1 192.168.0.1:/export/home
Host2 192.168.0.1:/export/home
Wq!
#cp /etc/nsswitch.nis /etc/nsswitch.conf
Files nisplus
Wq!
#domainname sun.com
#echo sun.com>/etc/defaultdomain
#nisserver –r –Y
Reboot
#cd /export/home
#nspopulate -v –F
Q)how to create nis+ client
#cp /etc/nsswitch.nis /etc/nsswitch.conf
Files nisplus
Wq!
#domainname sun.com
#echo sun.com>/etc/defaultdomain
#nisclient –I –h 192.168.0.1 –d sun.com
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
example
• #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
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 unix.123@planet.com -P john.planet.com. 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=10.20.30.40:/home/john 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
/etc/passwd
/etc/group
/etc/shadow
Q)fields in /etc/passwd
User-passwd-uid-gid-homedirectory-shell
Q)fields in /etc/group
A)groupname-gid
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
A)Useradd –u uid –g gid –d /export/home/naveen –m –s /bin/sh naveen
Q)whats are the files which maintain user informations
/etc/passwd
/etc/group
/etc/shadow
Q)fields in /etc/passwd
User-passwd-uid-gid-homedirectory-shell
Q)fields in /etc/group
A)groupname-gid
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
TERM=ansi
Export TERM
Mkdir /demo
Mount /dev/dsk/c0t0d0s0 /demo
Vi /naveen/etc/passwd
Root:KHGHGHGGFG:-remove this junk passwd
Wq!
Reboot it logins with out asking for passwd
# Passwd – enter new password.
#ok boot cdrom –s
TERM=ansi
Export TERM
Mkdir /demo
Mount /dev/dsk/c0t0d0s0 /demo
Vi /naveen/etc/passwd
Root:KHGHGHGGFG:-remove this junk passwd
Wq!
Reboot it logins with out asking for passwd
# Passwd – enter new password.
Subscribe to:
Posts (Atom)
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