UNIX and Shell Scripting - Module 3

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 13
At a glance
Powered by AI
The key takeaways from the document are the processes involved in logging into a UNIX system - init, getty, login, and login shell. It also describes the purpose of each process and the user's startup files.

The different processes involved in logging into a UNIX system are init, getty, login program, and login shell.

The getty process outputs the 'login:' prompt and waits for the user to enter their username. It then creates the environment for the login program and invokes the login program.

UNIX and Shell Scripting

Module 3: UNIX Process

Copyright © 2009 Accenture All Rights Reserved. Accenture, its logo, and Accenture High Performance Delivered are trademarks of Accenture.
Module 3 Objectives
• Upon completing this module, the learner will be able to:

– Describe the various processes invoked before and after login

Copyright © 2009 Accenture All Rights Reserved. 2


Module 3 Agenda

Topic Name Duration


Environment of UNIX Process 25 min

Copyright © 2009 Accenture All Rights Reserved. 3


Discussion: Logging into a UNIX System
• Discussion topic:
– How to Log into a UNIX System?

• Discussion time:
– 5 minutes

• Instructions:
– Ask students about their
experience/opinions.
– Write them on a flip-chart.

Copyright © 2009 Accenture All Rights Reserved. 4


Demonstration: Logging into a UNIX
System
• For slides 6 to 8

• This topic includes demonstration on login into the UNIX system.


It will be conducted in the following manner:
– Instruction:
• Demonstrate login into the UNIX system.
• Map it with respect to the login flow (slides 6 to 8)
• Ask participants to execute the same.

Copyright © 2009 Accenture All Rights Reserved. 5


Environment of UNIX Process (1 of 3)
Start UNIX System
When a UNIX system is Bootstrapped,
Kernel creates Init Process.

init Process

For each terminal port


Init calls getty process.

getty Process Getty outputs “login:” and waits for user to


enter user name. When user enters his user
name, getty’s job is complete.

Copyright © 2009 Accenture All Rights Reserved. 6


Environment of UNIX Process (2 of 3)

getty Process

Getty creates environment for


login and invokes login program.

Login Program The Login program:


• Displays “password:” prompt
• Validates user’s password
• Puts the user in his home directory
(If logged in correctly)
• Initializes user’s environment

Copyright © 2009 Accenture All Rights Reserved. 7


Environment of UNIX Process (3 of 3)

Login Program Login program invokes user’s


login shell (sh,ksh,bash).

Login Shell Login shell reads user’s start-up files


• .profile for bourne and korn shell
• .cshrc and .login for C shell

Once start-up files are done, login


shell provides shell prompt to user.

User at Terminal Enters commands.

Copyright © 2009 Accenture All Rights Reserved. 8


Knowledge Check (1 of 3)
• Which is the first process initiated by Kernel, when a UNIX
system is Bootstrapped?

1. getty
2. sh
3. init
4. login

Copyright © 2009 Accenture All Rights Reserved. 9


Knowledge Check (2 of 3)
• Which one of the following is not a valid login shell?

1. sh
2. bash
3. ssh
4. ksh

Copyright © 2009 Accenture All Rights Reserved. 10


Knowledge Check (3 of 3)
• State whether the following statements are True or False:

1. .profile is the users start-up file for bourne and korn shells.
2. getty creates environment for login and invokes login program.

Copyright © 2009 Accenture All Rights Reserved. 11


Module 3 Summary
• Upon completing this module, you should now be able to:

– Describe the various processes invoked before and after login

Copyright © 2009 Accenture All Rights Reserved. 12


Questions and Comments
• What questions or comments
do you have?

Copyright © 2009 Accenture All Rights Reserved. 13

You might also like