introduction to unix administration objectives –to identify the basic concepts of unix...
TRANSCRIPT
![Page 1: Introduction to Unix Administration Objectives –to identify the basic concepts of Unix administration Contents –history of Unix –unix vendors and standards](https://reader036.vdocuments.mx/reader036/viewer/2022082409/56649e525503460f94b47d2d/html5/thumbnails/1.jpg)
Introduction to Unix Administration• Objectives
– to identify the basic concepts of Unix administration
• Contents– history of Unix
– unix vendors and standards
– working as root
– system administration shells
• Practicals– evaluating an administration shell
• Summary
Unix
![Page 2: Introduction to Unix Administration Objectives –to identify the basic concepts of Unix administration Contents –history of Unix –unix vendors and standards](https://reader036.vdocuments.mx/reader036/viewer/2022082409/56649e525503460f94b47d2d/html5/thumbnails/2.jpg)
Unix - Genealogy
1969
1972
1975
1978
1981
1983
1985
1987
1989
1991
1993
1995
1
25
500
100000
2800000
5000000
Date Systems
SunOS
Amdahl UTS
Unix - PDP/7
Unix 1st edition - PDP/11
BSD
SunOS 4
SCO Unix
XENIX
Unix System V.3
AIX 3.1
Solaris 2.0
Solaris 1.0
BSD 4.2
BSD 4.3
UnixWare 2.0
BSD 4.1
AIX 4.1
AIX
Unix System III
Unix System V
UnixWare 1.0 Unix SVR4.2
Unix System V.4 - SVR4
Unix 7th edition - non PDP
Unix 5/6th edition - C
![Page 3: Introduction to Unix Administration Objectives –to identify the basic concepts of Unix administration Contents –history of Unix –unix vendors and standards](https://reader036.vdocuments.mx/reader036/viewer/2022082409/56649e525503460f94b47d2d/html5/thumbnails/3.jpg)
Major Unix Versions• AT&T System V
– currently release 4.2 (SVR4.2)
– most widely implemented version of Unix
• Berkeley Software Distribution (BSD)– pure BSD systems usually found as free Unix on PCs
– OSF/1 derived from BSD with SVR4 additions
HP HP/UX SVR4 + OSF/1ICL DRX SVR4SNI/Pyramid DC/OSx SVR4Silicon Graphics Inc IRIX SVR4 SCO UnixWare SVR4 Sun Microsystems Solaris 2 SVR4
SCO SCO Unix SVR3.2Sequent Dynix/PTX SVR3.2 + security
Sun Microsystems SunOS 4 BSDDEC Digital Unix OSF/1 + SVR4IBM AIX OSF/1 + SVR4
HP HP/UX SVR4 + OSF/1ICL DRX SVR4SNI/Pyramid DC/OSx SVR4Silicon Graphics Inc IRIX SVR4 SCO UnixWare SVR4 Sun Microsystems Solaris 2 SVR4
SCO SCO Unix SVR3.2Sequent Dynix/PTX SVR3.2 + security
Sun Microsystems SunOS 4 BSDDEC Digital Unix OSF/1 + SVR4IBM AIX OSF/1 + SVR4
![Page 4: Introduction to Unix Administration Objectives –to identify the basic concepts of Unix administration Contents –history of Unix –unix vendors and standards](https://reader036.vdocuments.mx/reader036/viewer/2022082409/56649e525503460f94b47d2d/html5/thumbnails/4.jpg)
Unix Standards• Unix has been standardised
– SVR4, OSF/1, POSIX, spec1170
– standards concentrate on kernel functionality and API
– administration not covered by standards
• Administration is similar for all Unix systems– command names can vary from one variant to another
– command options can vary
– some systems provide better support for administrators than others
• Unix administration is developing standards– Distributed Computing Environment (DCE)
– Domain Name Services (DNS)
– Common Desktop Environment (CDE)
![Page 5: Introduction to Unix Administration Objectives –to identify the basic concepts of Unix administration Contents –history of Unix –unix vendors and standards](https://reader036.vdocuments.mx/reader036/viewer/2022082409/56649e525503460f94b47d2d/html5/thumbnails/5.jpg)
Scope of this Course• To cover basic administrative functions
– describe underlying concepts and utilities
• Features described in a vendor independent manner– concentrate on SVR4
– reference to other systems where appropriate
• Cover common areas of administration in detail– users, processes, files & backups
– networking, terminals & printers
• Introduce less common administration– installing the system and software
– accounting & performance monitoring
• Useful commands are briefly described– use the on-line manual pages for full information
![Page 6: Introduction to Unix Administration Objectives –to identify the basic concepts of Unix administration Contents –history of Unix –unix vendors and standards](https://reader036.vdocuments.mx/reader036/viewer/2022082409/56649e525503460f94b47d2d/html5/thumbnails/6.jpg)
Discussion - Administration Roles• What are the typical jobs performed by a Unix System
Administrator in the following categories?
Operations Administration Technical Support
? ? ?
![Page 7: Introduction to Unix Administration Objectives –to identify the basic concepts of Unix administration Contents –history of Unix –unix vendors and standards](https://reader036.vdocuments.mx/reader036/viewer/2022082409/56649e525503460f94b47d2d/html5/thumbnails/7.jpg)
General Responsibilities• Identify your role and responsibilities
– can you delegate some of your work?
• Find out about your system– when was it purchased
– do you have hardware maintenance, if not why not?
– do you have OS maintenance, if not why not?
• What hardware does your system have?
• What software is installed?– is all the software necessary
• Who uses your system?
![Page 8: Introduction to Unix Administration Objectives –to identify the basic concepts of Unix administration Contents –history of Unix –unix vendors and standards](https://reader036.vdocuments.mx/reader036/viewer/2022082409/56649e525503460f94b47d2d/html5/thumbnails/8.jpg)
System Logbook• Keep a logbook for each system
• Record activities such as– system crashes
– maintenance,
– hardware problems
– system upgrades
– software installations
• Keep as paper copy, not an on-line copy
![Page 9: Introduction to Unix Administration Objectives –to identify the basic concepts of Unix administration Contents –history of Unix –unix vendors and standards](https://reader036.vdocuments.mx/reader036/viewer/2022082409/56649e525503460f94b47d2d/html5/thumbnails/9.jpg)
Working As Root• Nearly all Unix administration must be done as user root
– this superuser account (user id 0) has unrestricted access to the system
• Administration should be done by one person at a time– check that no one else is logged in as root
– if someone else is working as root, find out what they are doing
• In a secure room, keep the console logged in as root– useful for getting out of trouble if system starts to hang
– do all administration from the console
– disable root logins on other terminal lines for security
WARNING
root can irrevocably damage the system
take care when working as root
![Page 10: Introduction to Unix Administration Objectives –to identify the basic concepts of Unix administration Contents –history of Unix –unix vendors and standards](https://reader036.vdocuments.mx/reader036/viewer/2022082409/56649e525503460f94b47d2d/html5/thumbnails/10.jpg)
The su Command• The set user (su) command changes to another user
– runs a new shell for the new user
– exit from the new shell to resume original user's shell
• su changes your effective user id (and group id)– most commands use effective uid/gid for access control
– real uid/gid not changed
– be aware that some commands always use real uid/gid
• Root can use su without providing a password– other users must supply a password
$ su - rootpassword: work as root, with root's environment
$ su - rootpassword: work as root, with root's environment
![Page 11: Introduction to Unix Administration Objectives –to identify the basic concepts of Unix administration Contents –history of Unix –unix vendors and standards](https://reader036.vdocuments.mx/reader036/viewer/2022082409/56649e525503460f94b47d2d/html5/thumbnails/11.jpg)
Running Commands with su• su can be used to run a command as another user
– Use the -c option to specify a "command string"
– useful for including in shell scripts
• su defaults are in /root/.bash_profile– it it usual for root to have a separate su path
• su attempts are logged in /var/log/messages
• Permission file: /etc/sudoers tell who is allowed to su
• Permission file is edited with command visudo
# /bin/su - printer -c “cleanup”run the printer cleanup script
# /bin/su - printer -c “cleanup”run the printer cleanup script
# more /root/.bash_profile# more /root/.bash_profile
![Page 12: Introduction to Unix Administration Objectives –to identify the basic concepts of Unix administration Contents –history of Unix –unix vendors and standards](https://reader036.vdocuments.mx/reader036/viewer/2022082409/56649e525503460f94b47d2d/html5/thumbnails/12.jpg)
Exercise - Using su• What do the following commands do and which ones require
a password?
$ su
# su - henry
$ su -
# su - root -c poweroff
# exit
$ su root -c "rm /tmp/.lock321"
$ su
# su - henry
$ su -
# su - root -c poweroff
# exit
$ su root -c "rm /tmp/.lock321"
![Page 13: Introduction to Unix Administration Objectives –to identify the basic concepts of Unix administration Contents –history of Unix –unix vendors and standards](https://reader036.vdocuments.mx/reader036/viewer/2022082409/56649e525503460f94b47d2d/html5/thumbnails/13.jpg)
Traditional Administration
• Traditionally, Unix administration requires a good knowledge of the Unix operating system
• Administrators work directly with configuration files and special programs
• Administrators develop or borrow extra programs and scripts to support standard utilities
• Difficult for novice administrators even to get started...
![Page 14: Introduction to Unix Administration Objectives –to identify the basic concepts of Unix administration Contents –history of Unix –unix vendors and standards](https://reader036.vdocuments.mx/reader036/viewer/2022082409/56649e525503460f94b47d2d/html5/thumbnails/14.jpg)
Administration Shells• System manufacturers often provide menu driven
administration interfaces– some are better than others– some only work under X-Windows
• Admin shells are not as comprehensive as one would like– Unix administrators still need to know about underlying commands
• smit on AIX is awarded to be the most friendly and comprehensive front end to administration
Linux WebMin httpSuSE YaST tty & XAIX SMIT tty & XDigital Unix setup ttyHP/UX SAM XIRIX Cadmin XSCO Unix sysadmsh ttySolaris 2 admintool XSVR4 sysadm tty
Linux WebMin httpSuSE YaST tty & XAIX SMIT tty & XDigital Unix setup ttyHP/UX SAM XIRIX Cadmin XSCO Unix sysadmsh ttySolaris 2 admintool XSVR4 sysadm tty
![Page 15: Introduction to Unix Administration Objectives –to identify the basic concepts of Unix administration Contents –history of Unix –unix vendors and standards](https://reader036.vdocuments.mx/reader036/viewer/2022082409/56649e525503460f94b47d2d/html5/thumbnails/15.jpg)
Summary
• Unix administration is similar but not identical for all systems
• Unix administrators tend to learn a lot about how Unix works
• Nearly all administration is undertaken as the superuser (root)
• Administration shells such as sysadm or SMIT can simplify Unix for novice administrators
• Use the su command to run a shell as another user
• When you know one Unix system you can easly learn all other dialects.
• SuSE uses yast and yast2 for most common admin work.