1 / 15

Advanced Unix - 5 Sep 2005

Advanced Unix - 5 Sep 2005. Review: Lab-1. Using vi, change the max number of days a password can be used to 180 Edit /etc/login.defs Change PASS_MAX_DAYS to 180 Using vi change the minimum password length to 7 Edit /etc/login.defs PASS_MIN_LEN to 7. Review: Lab-1.

mimis
Download Presentation

Advanced Unix - 5 Sep 2005

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 - 5 Sep 2005

  2. Review: Lab-1 • Using vi, change the max number of days a password can be used to 180 • Edit /etc/login.defs • Change PASS_MAX_DAYS to 180 • Using vi change the minimum password length to 7 • Edit /etc/login.defs • PASS_MIN_LEN to 7

  3. Review: Lab-1 • Create a new group called students using the groupadd command (as root) groupadd students • Change default group for new users to students using the useradd command (as root)useradd –D –g students • Create an account for yourself

  4. Review: Lab-1 • Create a new user with an expiration date of 10/1/2005 useradd –e 10/01/2005 user1 • Look at /etc/shadow user1:!!:13027:0:180:7::13056: • The 13027 is the number of days from 1 Jan 1970 and as is 13056

  5. Unix “Epoch” Date = 1 Jan 1970 • The early Unix engineers picked that date arbitrarily, because they needed to set a uniform date for the start of time, and New Year's Day, 1970 seemed most convenient.

  6. The ‘2038 Bug’ • On Jan 19th 2038 many computers will encounter a date-related bug in their operating systems and/or in the applications they run. This can result in incorrect and wildly inaccurate dates being reported by the operating system and/or applications. • “…reports of temporal echoes of the 2038 problem are already starting to appear in future date calculations for mortgages and vital statistics!” • See: http://maul.deepsky.com/%7Emerovech/2038.html • Demo: 2038ck.pl

  7. The ‘2038 Bug’ • For more information see: http://maul.deepsky.com/%7Emerovech/2038.html • Demo: 2038ck.pl • Some of you will still be members of the IT Community…..Don’t wait until the last minute!!!

  8. Review: Lab-1 • Add your full name to the account you created for yourself using usermod usermod –c “<yourname>” <userid> • Bottom Line – Many, many ways to manage your users. Including the various GUI applications.

  9. Review: Lab-1 • Did you make an ISO image? Mount it? Add to /etc/fstab? dd if=/dev/cdrom of=/home/ISO/fc4-dvd.iso mount /home/ISO/fc4-dvd.iso -t iso9660 –o \ loop=/dev/loop1 /mnt/iso /home/ISO/fc4-dvd.iso /mnt/iso iso9660 \ loop=/dev/loop1,noauto

  10. System Profiles • When a user logs in a system profile is established • Set’s environment variables • I.e. PATH=/bin;/usr/bin; • Set’s alias’s • I.e. alias rm ‘rm –i’ alias cp ‘cp –I’ alias cls ‘clear’

  11. System Profiles • Various system-wide profiles: • /etc/profile (bourne shell) • /etc/bashrc (bash shell) • /etc/tcshrc (c-shell) • User specific profiles (located in home dir) • ~/.profile • ~/.bashrc • ~/.tcshrc

  12. Shell Scripts • A shell script is a group of commands, funtctions, variables, etc., that can be run from the shell prompt (command line) • Chapter 12 gives an overview of how shell scripts work and can be used. • Automate system chores • Application startup • Even generate web pages • http://www.wildbill.org/rose/fall05.cgi

  13. Shell Scripts (/etc/init.d/*) • Many of the startup scripts are located in the /etc/init.d directory • Know and understand symbolic links • A symbolic Link is where a file has one main name, but there's an extra entry in the file name table that refers any accesses back to the main name

  14. Symbolic Links • Symbolic links are set up using the ln command with the -s option - so for exampleln -s filename1.txt filename2.txt

  15. System Boot Up (init) • Chapter 12, Page 454 • Boot Sequence • /etc/inittab file • Run levels (page 457) • run-level scripts (page 459) • Be familiar with the table pages 460-461 • Demo: /etc/init.d /etc/rc3.d /etc/rc5.d …..etc.

More Related