ished. No error reported.
6) Reboot your system, remove bootable CD and we should have the boot menu ready when the system starts.
Note : There would be slight difference when using with other distros.
Ques 4. Explain the fields in /etc/passwd and /etc/shadow ?
Ans – The /etc/shadow file stores actual password in encrypted format with some additional properties related to user password.It mainly holds athe account aging parameters. All fields are separated by a colon (:) symbol. It contains one entry per line for each user listed in /etc/passwd file Generally, shadow file entry looks as below.
Here is the explanation of each field.
User name : Your login name
Password: Your encrypted password.
Last password change : Days since Jan 1, 1970 that password was last changed
Minimum: The minimum number of days required between password changes.
Maximum: The maximum number of days the password is valid.
Warn : The number of days before password is to expire that user is warned that his/her password must be changed
Inactive : The number of days after password expires that account is disabled
Expire : days since Jan 1, 1970 that account is disabled. It indicates an absolute date specifying when the login may no longer be used
The /etc/passwd file stores essential information, which is required during login /etc/passwd is a text file, that contains a list of user account related parameters like user ID, group ID, home directory, shell, etc.
Here is the sample entry from /etc/passwd file
Username: User’s login name.
Password: An x character indicates that encrypted password is stored in /etc/shadow file.
User ID (UID): Each user must be assigned a user ID (UID). UID 0 (zero) is reserved for root.
Group ID (GID): The primary group ID
User Info: The comment field. It allow you to add extra information about the user.
Home directory: The absolute path to the directory the user will be in when they log in.
Command/shell: The absolute path of a command or shell (/bin/bash).
Ques 5. How do you boot your system into the following modes, when you are in some trouble ?
Ans – a) Rescue mode
b) Single user mode
c) Emergency mode
Rescue mode provides the ability to boot a small Linux environment from an external bootable device like a CD-ROM, or USB drive instead of the system’s hard drive.Rescue mode is provided to help you with your system from repairing the file system or fixing certain issues which prevent your normal operations.
In order to get into the rescue mode, change the BIOS settings of the machine to boot from the external media. Once the system started booting using bootable disk, add the keyword rescue as a kernel parameter or else you can give the parameter “linux rescue” in the graphical boot interface.
In single-user mode, the system boots to runlevel 1, but it will have many more additional functionalities compared to switching to runlevel 1 from other levels.
The local file systems can be mounted in this mode, but the network is not activated.
Use the following steps to boot into single-user mode:
1) At the GRUB splash screen during the booting process, press any key to enter the GRUB interactive menu.
2) Select the proper version of kernel that you wish to boot and type “a” to append the line.
3) Go to the end of the line and type “single” as a separate word.
4) Press Enter to exit edit mode and type “b” to boot into single usermode now.
In emergency mode, you are booting into the most minimal environment possible. The root file system is mounted read-only and almost nothing is set up. The main advantage of emergency mode over single-user mode is that the init files are not loaded. If the init is corrupted , you can still mount file systems to recover data that could be lost during a re-installation. To boot into emergency mode, use the same method as described for single-user mode, with one exception, replace the keyword single with the keyword “emergency”.
6. In the ps results few of the processes are having process state as “D” . What does it mean ? Briefly explain different process states ?
Ans : To have a dynamic view