Unix Administration - Systems Ecology This page is intended for internal use only. It serves to make good use of the Unix systems of the Systems Ecology Group.

Unix Administration - Systems Ecology

Its available only to the staff of the Terrestrial Systems Ecology Group at ETH Zurich, Switzerland. Please report mistakes or needed updates to Andreas Fischlin! Thanks :-)         Last modified 29/07/19       [ Bottom of page ] [ Unix Enduser Hints ] [ SE Internals ]



Contents of this web page:



  • login and shells

    System administrator uses vipw (edits also /etc/stmp) to specify the initial shell for every user as listed in file /etc/passwd (owned by root with exlusive write rights!). /etc/shells (inawa only) lists all shells available as user's shells.

    Shell executable file Shell name Config files (global) Config files (HOME) Comment
    /sbin/sh
    /usr/bin/sh
    /bin/sh (normally)
    Bourne shell /etc/profile .profile works always, e.g. required by root for urgency maintenance
    /usr/bin/csh
    /bin/csh (normally)
    C shell /etc/.login .cshrc, .login I recommend to refrain from using csh, use tcsh instead, or better none at all (Csh Programming Considered Harmful).
    /usr/bin/tcsh (inawa, okee)
    /usr/local/bin/tcsh (okee)
    /bin/tcsh (normally)
    extended C shell /etc/csh.cshrc 1, /etc/csh.login1 .tcshrc (or if missing .cshrc), .login a convenient shell to work with, since it offers history, file name extension by TAB etc. However, see notes above.
    /usr/bin/ksh
    /bin/ksh (normally)
    Korn shell /etc/profile .profile Both files only read during login2
    /usr/bin/bash
    /bin/bash (normally)
    Bourne again shell /etc/profile .bash_profile, .bash_login, .profile (stops after first found)
    .bashrc
    A Bourne shell compatible replacement with C, Korn shell like enhancements.
    /bin/false Pseudo shell     For users who will never login
    /bin/sh (unless specified) su /etc/default/su /etc/default/su For system administration (cf. man su)

    1 The behavior of the /usr/local/bin/tcsh (SunOS >= 5.6) differs to that of /usr/bin/tcsh (= /bin/tcsh on inawa, UNIX(r) System V Release 4.0). It is not what it should be AFAIK, i.e. the two global files are ignored. Instead just /etc/.cshrc and /etc/.login are sourced, i.e. etc/csh.cshrc and etc/csh.login are ignored. Fortunately the local .tcshrc file is sourced as it should.

    2 If you wish the Korn shell to read a file at its launch time, set environmental variable ENV to that file. E.g. on the huron /etc/profile defines ENV=~/.kshrc. The default shell is the bash shell, which reads /etc/profile during each login. Thus you can use a local .kshrc file in your home directory to customize the behavior of the Korn shell.

    above tested on inawa.ethz.ch (January 2000, af)

    files are listed in sequence of execution; global files are executed first, but only for ordinary users (e.g. not for root).

    Any global .profile, or *.login files are ONLY executed at login. However, e.g. .cshrc files are executed whenever you launch a new shell, e.g. by typing csh. Note, the tcsh differs from all other shells, since it does also execute once more the global configuration file, i.e. /etc/etc.cshrc (or /etc/.cshrc if /etc/.tcshrc). However, under OS X using application /Applications/Utilities/Terminal.app, any opening of a new window is considered a login and will thus source .profile once.

    The bash shell does NOT execute .bashrc during login. However, every subsequent invocation of a bash shell will execute the file .bashrc from your home directory.

    Templates for local .login, .cshrc etc. files are stored at /etc/skel

    see also Frisch, p. 164 for more on this topic. Apple's Shell Scripting Primer contains also lots of useful and well explained information on scopes of variables (environment, global, local variables) and their passing when executing or sourcing scripts and routines.

    Access to a login shell

    All users should be able to access a shell only through ssh (Installing OpenSSH Packages for SPARC under Solaris 8; further links: Installing OpenSSH on the Solaris 8 OS, Unixguide ssh installation for Solaris 8). Telnet, rlogin, rsh, rcp services are insecure and should all be disabled. To disable telnet simply comment in file /etc/inetd.conf the line starting with telnet. To disable that root can login from anywhere else than the system console, edit in file /etc/default/login the line containing CONSOLE as follows

         CONSOLE=/dev/console
    However, these settings do not affect ssh. For more on this see Why can't I rlogin/telnet in as root?.
  • RASS


  • netatalk (AppleTalk on Unix)

    stop it:     /etc/init.d/atalk stop
    start it:     /etc/init.d/atalk start

    installation (on inawa under solaris 2.5.1, 19. Nov. 1999, ft & af):
        as root in dir /home/admin/
        unpack netatalk-1.4b2+asun2.1.3.tar
        creates dir netatalk-1.4b2+asun2.1.3/
        netatalk needs to be built and installed according to README files
        but with following specialities:
        
          - DESTDIR = /usr/local/atalk
    
          - ATALKD.CONF:   on inawa instead of  le0  write hme0
    
          - The following definitions commented, since not to be used:
    	    TCPWRAPDIR
    	    PAMDIR Authentication
    	    DESDIR Verschlüsselung
    
          - manuals => /usr/share/man  in section 8
            
    edit man configuration file, i.e. /usr/man/man.cf, by inserting section 8
    complete installation with catman 8
    test installation with man atalkd
    Netatalk+Asun under Solaris howto


  • mail

    stop transfer agent demon:     /etc/init.d/sendmail stop
    start transfer agent demon:     /etc/init.d/sendmail start

    auto start (at boot time) of transfer agent demon sendmail.
    • to activate auto start rename minor scripts to capital ones. Result:
      	inawashiro-ko.root[]61: ls /etc/rc?.d/*sendmail
      	/etc/rc0.d/K57sendmail  
              /etc/rc1.d/K57sendmail  
              /etc/rc2.d/S88sendmail
    • to deactivate rename capital scripts to minor ones. Result:
      	inawashiro-ko.root[]61: ls /etc/rc?.d/*sendmail
      	/etc/rc0.d/k57sendmail  
              /etc/rc1.d/k57sendmail  
              /etc/rc2.d/s88sendmail
    configuration

    On okeechobee I used the standard configuration. It allows to send E-mail within the same machine from user to user. To additionally enable sending of mail to the outer world, i.e. to the SMTP server groupw1.ethz.ch, I needed simply to insert in /etc/hosts a new line which defined the alias mailhost as follows:

    	129.132.97.47   mailhost
        
    After that I could easily send out mail (but not receive any, unless demon sendmail is started). BTW: Learn about the IP# of a host by
    
    	# /usr/sbin/nslookup groupw1.ethz.ch
    	Server:  dns1-rz-fddi.ethz.ch
    	Address:  129.132.98.12
    
    	Name:    groupw1.ethz.ch
    	Address:  129.132.97.47
        

    FAQ sendmail; see also Frisch, p. 635 for more


  • gnu


  • NFS

    access via NFS another machine, e.g. ides:/anonymous, like this
        cd /net/ides/anonymous
        


  • Miscellaneous

    ifconfig -a   to learn about IP# (inet) etc.
    pkgadd -d   to install a package

    coreadm -d global   to disable global core dumps. If these are enabled (default configuration Solaris 9), each process that expires produces 2 core files, one in the current directory, the other in the global core file path (default: /var/core). This can cause OVERFLOW of root partition!
    coreadm -d global-setid   to disable global-setid core dumps.
    coreadm   to display current core dump configuration.

    domainname   have a file /etc/defaultdomain which contains just the domainame text, e.g. inawa.ethz.ch. You are free to use any domainname you wish (?). Otherwise set it on the fly as root with domainname inawa.ethz.ch
    Proactive Sun System Maintenance

  • Notes - Under construction

    drvconfig;devlinks;disks

  • Recommended reading:

    Frisch, Æ., 1995 (2nd. & minor corr. ed.). Essential system administration - Help for UNIX system administrators. O'Reilly & Associates: Beijing a.o., 758 pp.

    Mac OS X Server Documentation

    Sun man pages

      


  • Hack Alert

    Systems Ecology staff addresses and phone numbers (access restricted)

    A list of IP numbers as used by our computers (access restricted) etc. of our servers

    To shutdown a Sun read this.

    The master for this document is here (access restricted).

    Back to: Top  of page     Terrestrial Systems Ecology 
    Environmental Physics (UP)     Institute of Biogeochemistry and Pollutant Dynamics (IBP)    
    Partner institutes: Institute for Atmospheric and Climate Science (IAC)     Institute of Integrative Biology (IBZ)    
    Department of Environmental Systems Science     ETH Zurich  

    Responsible for content: Andreas Fischlin
    or contact Webmaster ( Last modified 29/07/19 )