Admin Commands

This document will cover the Unix Admin commands that are largely the same on all flavors of Unix. (Lot of clean up is needed. For now, just dumping commands from cmd.admin.ref that should not go to sol.html)

NIS


ypcat (group, passwd)
ypstart         # linux
ypbind
ypinit          # client, specify machines to bind to
                # server, specify whether master or slave
ypwhich         # tell what NIS server machine is bound to.
passwd
yppasswd (obsolete, for combatibility only)

ypcat -k auto.master    (-k to display the key name too!)
ypcat -k auto.direct    (the direct map, use /-)

/var/yp/binding/DOMAIN/ypservers        # list of ypservers that can be used (non broadcast mode)



passwd 

pwconv  update shadow file based on new user additon to passwd (does not set password)
passwd  [uid]           change password for user
chown   [uid]:[gid]     /home/[user]    change user home dir ownership


Config Files

/etc/passwd
/etc/groups
/etc/shadow
/etc/group

/etc/init.d/ (linux: /etc/rc.d/init.d/)

/etc/inet/inetd.conf
/etc/printcap  or /etc/printer.conf
/etc/motd
/etc/release            # see which os cd was used eg sol 8 01/00 for Jan 2000 build. 

/etc/resolv.conf        # dns setup
/etc/nsswitch.conf      # order of search for files/dns/nis
/etc/init.d/            # list of programs that are configured for possible start up/shutdown automatically.
                        # actual start in /etc/rc2.d and rc3.d


CMD


dmesg   : display error log messages, like /var/adm/message, etc 
          obsolete by syslogd


du -kxS *       = display space usage Summary for only (x) one file sys (ie local)
        -d      = solaris native du, do not cross fs boundary, good for du -dsk / and only report ufs, sans nfs.
                  BUT du -dsk * will cross ufs and nfs that are mounted at the root level, such as /nfshome :(
        -x      = gnu du, "only 1 fs", but only Linux has desired behaviour like solaris -d
du -dk  / | sort -n | less      # use in solaris
du -skx * | sort -n | less      # use in linux          ??

df -kl          = report fs space usage of local fs, solaris and linux


rpcinfo -b ypserv 1 (and 2)     find out all nis server on the subnet
rpcinfo -p tin-linux                            : show all rpc progs on machine tin-linux
rpcinfo -n 2049 -u tin-linux 100003 : see if nfs server is running
rpcinfo -n  802 -u tin-linux 100005 : see mountd info
rpcinfo -n 1048 -u tin-linux 100005 : see mountd info
        # note that mountd port may differ, see output of rpcinfo -p


nice, renice, priocntl:         change scheduling priority of process
        (ps/top, higher priority has higher numberic value 0=lowest, 100?=highest
        nice, higher number = nicer = lower priority
        -ve value of nice means not-nice, ie get more sys res, settable by root)

        eg renice 10 -p [pid]   : renice the process to 10 (from usual 0), thus making it to have less priority and demand less sys resource

        priocntl -s -p -5 -i pid 8200 :
        set the priority of process #8200 to -5.
        -s = set
        -p = priority
        -i pid = specify class of process, can group by parent pid, etc.



date --set [datestring] : linux, set date/time of machine, the string can almost be anything.
catman -w -M /usr/local/man     : rebuild the man page index for the dir /usr/local/man
catman -w       : probably rebuild based on $MANPATH



dhclient        = get dhcp address from server for current client.
(linux only?  move...)


---
99.999% uptime allow for 5.26 min of downtime in 1 year.
99.99%  allow for  52 min of downtime.
99.95%  allow for 263 min of downtime, a bit less than  4.5 hours.
99.9%   allow for 526 min of downtime, a bit less than 10   hours.





TBD


old *.ref file content in here.









[Doc URL: http://www.cs.fiu.edu/~tho01/psg/admin.html]
(cc) Tin Ho. See main page for copyright info.


"LYS on the outside, LKS in the inside"
"AUHAUH on the outside, LAPPLAPP in the inside"