1 - Community

advertisement
Sample Questions
1.
Default packet size for ping.
64 byte packets are used for ping.
HP-UX 11.0 system]
2.
file.
[From doing a ping on an
How many servers (maximum) can be specified in /etc/resolv.conf ?
Up to 3 nameserver entries can be entered in the resolv.conf
[pg. 91, Installing and Administering Internet Services]
3.
When you create a file in UNIX, by default what permissions will be
applied to it? How do you change this setup?
The default permissions on new files are -rw-rw-rw-. The
default permissions on new directories are -rwxrwxrwx. You change this
setup with the umask command. [pg. 192, Using HP-UX]
4.
Can a non-root user influence the job priority?
Job priority is controlled with the nice/renice commands.
The man page for renice says the following: "Users who do not have
appropriate privileges cannot reduce the system nice values of their own
processes, even if they increased them in the first place." Would assume
that this means that the answer to the above question is no. [man page for
renice]
Nice values of 21 to 39 degrade priority, while nice values
of 0 to 19 improve it. These latter nice values require super user access.
This would indicate that a user can degrade the priority of one of their
jobs, but not improve priority. [pg. 162, HP-UX Tuning and Performance]
5.
How to display all the lines in a file not matching with a string.
Use the command "cat <filename> | grep -v <string>". The -v
option tells grep to show all lines but those matching. [man page for grep]
6.
How does a jfs file system write into its log file? i.e before
updating on the disk or after updating .
Before writing a file system change to disk, the change is
written to the intent log. The intent logs consists of records of all
pending changes to the file system structure, that is, a logging of
transactions the system intends to make to the file system prior to actually
doing the changes. [pg. 136, HP-UX System Administration Tasks].
7.
How do you supply a cron job?
crontab <script file>.
8.
[pg. 213, Using HP-UX]
Significance of at.allow, at.deny and their priority.
The files allow or deny the use of the at command.
takes priority over at.deny. [pg. 211, Using HP-UX]
9.
What will the linkloop command do?
loopback.
10.
at.allow
This command will verify LAN connectivity with a link-level
[man page for linkloop]
Which command will show socket status?
The "netstat -a" command will show the state of all sockets.
[man page for netstat]
11.
How much time does a client wait if none of the servers specified in
/etc/resolv.conf are responding for name query?
Not sure about this one, but I believe the timeout is 5
seconds during the first attempt at name resolution. See the reference book
for more information. [pg. 107, DNS and BIND]
12.
How do you disable or enable ARPA/BSD services?
By modifying the /etc/indetd.conf file and un-commenting the
services that you want to run. [pg. 40, Installing and Administering
Internet Services]
13.
Significance of /var/adm/inetd.sec
Controls which remote hosts are allowed access to the
services on your host. [pg. 41, Installing And Administering Internet
Services]
14.
For a given subnet mask , how may hosts can be incorporated in a
subnet.
Ex.
255.255.255.0
255.255.0.0
255.0.0.0
->
->
->
254 hosts
65534 hosts
16777214 hosts
15.
What subnet mask should be assigned to a network to get a required
number of hosts in a subnet?
See 14 above.
16.
What would the command fsck -o full,nolog be used for.
This command would perform a file system check and repair of
a vxfs file system and will exercise the options (-o) full, which will
perform a full file system check, and nolog, which will tell the fsck to not
perform log replay. [man page for fsck_vxfs]
17.
NFS export options.
The options on an NFS export are as follows:
async - all mounts will be asynchronous.
ro - export the directory read-only.
rw=hostname[:hostname]... - export the directory
read-mostly (read only to all machines except read-write to machines listed.
anon=uid - if a request comed from an unknown user,
use uid as the effective user ID.
root=hostname[:hostname]... - Give root access only
to the root users from a specified hostname.
access=client[:client]... - Give mount access to
each client listed.
[man page for exportfs]
18.
How do you set up a secondary DNS server?
Run the hosts-to-named command with the -z or -Z option.
Move the file created to the /etc directory on the secondary
server and rename it to named.boot.
Copy the following files from the master DNS server to the
secondary server:
/etc/named.data/db.cache
/etc/named.data/db.127.0.0
[pg. 86-87, Installing and Administering Internet Services]
19.
What daemons will run only on a primary NIS server?
The daemons that runs only on the NIS master server are
rpc.yppasswdd and rpc.ypupdated. These daemons allow changes to the NIS
maps with can only occur on the NIS server. [pg. 155, HP-UX System and
Administration Guide and man pages for yppasswdd and ypupdated]
20.
How do you update maps on secondary NIS server?
After the NIS maps have changed on the NIS master, there are two
ways to update the maps on a slave server:
1.
From the master, use the command "yppush" (which actually tells the
slave to do a ypxfr).
2.
From the slave, use the command "ypxfr".
[pg 159, HP-UX System and Administration Guide]
21.
What is a stale file handle error in NFS?
This occurs when one client removes and NFS-mounted file or
directory that another client has open. [pg. 287, Installing and
Administering NFS Services]
22.
What is a reason that users should be grouped?
So that files owned by members of a given group can be
shared and yet remain protected from access by users who are not members of
the group. [pg. 34, HP-UX System Administration Tasks]
23.
What variable contains the command line arguments in shell
scripting?
The variable that contains the command line arguments, but
not the command itself is $*. The arguments can also be retrieved
individually by using the $1 to $9 arguments. Arguments greater than 9 can
be specified like the following ${10}. The $0 argument is the command name.
[pg. 476, The HP-UX System Administration Handbook & Toolkit]
24.
What is syntax of adding a new route?
<gateway>".
25.
The syntax of adding a new route is "route add <destination>
[man page for route]
Can NIS work without NFS?
Vice versa?
Yes, they are totally separate and can be used with or
without each other.
26.
Is TCP/IP needed for NFS and NIS?
Yes, they are part of the TCP/IP suite of products.
319, MCSE Fast Track: TCP/IP]
27.
[pg.
What does ZZ and wq mean in vi?
These both mean save file and exit vi.
[Quick Reference for
vi card]
28.
How do you combine results of two commands, ( e.g.. date + id )
using shell script.
You can do this by using the grave accent (`). This forces
the execution of the command within the grave accent first. The shell
script command for the above would be: echo `date``id`. [pg. 5-8, Shells:
User's Guide]
29.
What is the effect of /etc/hosts.equiv on root user.
The /etc/hosts.equiv file can be configured to allow users
access to a host without supplying a password. This file is checked
whenever a user other than root attempts to log on. When the root user
tries to log on, the .rhosts file is checked. Therefore, the
/etc/hosts.equiv file has no effect on the root user. [pg. 55-56,
Installing and Configuring Internet Services]
30.
How do you do a full fsck on a vxfs file system?
Use the command fsck -o full.
31.
[man page for fsck_vxfs]
Can fsck be used for both hfs & vxfs file systems?
Yes, fsck can be used on both types of file systems.
[man
page for fsck]
32.
How do you find available size before creating a logical volume?
Use the command "vgdisplay" to display the volume group to
which you want to add the logical volume. Look for the Free PE value.
[man page for vgdisplay]
33.
What LVM function can NOT be done using SAM?
*
*
*
*
*
*
*
You cannot do the following LVM functions with SAM:
Extending a logical volume to a specific disk.
Creating the root volume group and a root logical volume.
Backing up and restoring a volume group configuration.
Moving and reconfiguring your disks.
Moving data from one LVM disk to another.
Reducing the size of a logical volume.
Setting up alternate cables to a physical volume.
[pg. 88, HP-UX System Administration Tasks]
34.
What is the run level for NFS?
Run level 3 is for exporting NFS file systems. [pg. 117,
HP-UX System Administration Handbook and Toolkit OR pg. 36, HP-UX System
Administration Tasks]
35.
What is the file system type for /stand? ( hfs )
/stand is an HFS file system.
36.
What command can be used to list all the patches installed on a
system?
The swlist command can be used to find out what patches are
installed on a system. More specifically, use the command "swlist -l
product". [man page for swlist]
37.
What are the steps involved in building new kernel?
The HP-UX commands to manually reconfigure the kernel are as
follows:
*
Use the system_prep command to extract the system file from the
current kernel.
cd /stand/build
system_prep -v -s system
*
Edit the /stand/build/system file to perform your task or use
kmsystem and kmtune to make changes.
*
Build the new kernel:
mk_kernel -s system
*
Move the old system file and kernel so if anything goes wrong, you
still have a bootable kernel:
mv /stand/system /stand/system.prev
*
Update the kernel with the newly generated kernel. Automatically
saves the old versions of vmunix and dlkm in /stand:
kmupdate /stand/build/vmunix_test
*
Reboot the system.
[pg. 60, HP-UX 11.x System Administration Handbook and Toolkit]
38.
What steps are involved in extending a logical volume and file
system if OnlineJFS is installed on the system?
The steps are as follows:
*
Use lvextend to increase the size of the logical volume.
*
Use fsadm to increase the size of the file system. It does not have
to be unmounted since the OnlineJFS product is installed.
[pg. 151-152, HP-UX System Administration Tasks]
39.
What is the default HP-UX shell?
The default HP-UX shell is the POSIX shell.
[pg. 94, Using
HP-UX]
40.
How do you list and create special files?
To list special files, use the command lssf. To create special
files, you can use the command mksf or insf. [man pages for lssf, mksf, and
insf]
Download