1 / 19

Advanced Unix – 30 Aug 05

Advanced Unix – 30 Aug 05. Administrative Tools. Creating an ISO Image. Create an ISO image Place your textbook cd’s or dvd in the drive As root create a directory mkdir /home/ISO As root type the following to make image: dd if=/dev/cdrom of=/home/ISO/fc4-dvd.iso. Mounting the ISO Image.

Download Presentation

Advanced Unix – 30 Aug 05

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Advanced Unix – 30 Aug 05 Administrative Tools

  2. Creating an ISO Image • Create an ISO image • Place your textbook cd’s or dvd in the drive • As root create a directory mkdir /home/ISO • As root type the following to make image: dd if=/dev/cdrom of=/home/ISO/fc4-dvd.iso

  3. Mounting the ISO Image • Make directory under the /mnt directory called iso • The you can mount the ISO image with: mount -o loop=/dev/loop1 -t iso9660 filename.iso /mnt/iso • To simplify this add the following line to /etc/fstab /home/ISO/fc4-dvd.iso /mnt/iso iso9660 loop=/dev/loop1,noauto

  4. Administrative tools • Do you have a non-root account created? • If not, create one now, (as root) type: useradd <your id> • No add a password to the account: passwd <your id>

  5. Administrative tools • Superuser root • Almost unrestricted access • Become a superuser • Log in to root • Use su or su – • Inherits the env from current shell • Only use superuser when it is needed • Change root password periodically • Employment status change for SA • Unauthorized access

  6. Administrative tools • Lock your screen • Use xlock • Controlling access • System V • BSD – member’s of group 0 • Linux – GNU su does not check membership of group 0 • Terminal access control • Run a command with su same time • su root –c “command”

  7. Administrative tools • Facility sudo • Selective access • Allow some user to run specific commands as root without having to know the root password • RUN sudo command • Type in user’s own password • Good for a configurable time, default 5 minutes • Configuration file /etc/sudoers • Users • Commands • Format Users host=commands

  8. Administrative tools • More about Facility sudo • Select the commands for sudo with care • No shell scripts • No utility which provides shell escapes • Editor visudo • Lock • Syntax checking

  9. Quick Demo of sudo • As a normal user type the following: /bin/cat /etc/sudoers • Now try the following: sudo /bin/cat /etc/sudoers • Now we add the following to /etc/sudoers <your id> ALL=/bin/cat /etc/sudoers • Now try step 2 again…

  10. Administrative tools • Advantages • Command logging - accountabilities • Operators can do chores • Hide the real root password • Revoke the privilege without change root password • A list is maintained • Less chance of root shell left unattended

  11. Administrative tools • More about Facility sudo • Disadvantage • Breach in security of a personal account = root account • Logging can be subverted • sudo csh • sudo su

  12. Administrative tools • Communicating with Users • Command write • Write username [tty] • who • Rwho • Ctrl – D end it • Reply with write will create a two-way communication • Command talk • Separate window for sender and receiver • Disable message • Command mesg n • Root account can override the setting

  13. Administrative tools • More about Communicating with Users • Sending message to all • Command wall • Very useful • The message of the Day • /etc/motd

  14. Administrative tools • Administration tools • Examples: • Digital Unix: SETUP • HP-UX: SAM • Solaris: admintool • Good • Quick start to system administration • Raw commands • Easy: combine several steps • Downside • Type to command is faster • Not all commands available through menu • Slow down the learning process

  15. Administrative tools • HP-UX’s SAM • Perform a variety of system management tasks • System configuration • Change a parameter • File system management • … • Detailed logging • System tools for Linux

  16. Manuals • Unix has two types • Man pages • Individual commands • For format • Routines • Supplemental documents • Printed • online from Internet • DVD/CDROM • RFCs (Request for Comments) for protocols, standards used on the Internet

  17. Organization of man pages

  18. Manual • Man pages are kept • Under /usr/man/man# or /usr/share/man/man# • Format (troff, SGML) • Compressed (compress or gzip) • read manual pages: man • $man title • Example: $man ls • $man section title • Example: $man 4 tty • Solaris Example: $man –s 4 tty

  19. Manual • More about reading manual pages: man • MANPATH • /etc/man.config • Add new man pages besides the system ones. Example: MANPATH=/home/share/localman:/usr/share/man export MANPATH • Keyword search in synopsis • $man –k keyword Example: $man –k mount

More Related