Podcast
Questions and Answers
What is a key expected outcome of this module related to user accounts?
What is a key expected outcome of this module related to user accounts?
Which component is NOT part of the process structure manipulation in Unix?
Which component is NOT part of the process structure manipulation in Unix?
What does the acronym 'LDAP' stand for in the context of Unix?
What does the acronym 'LDAP' stand for in the context of Unix?
Which statement best describes the Unix operating system's historical significance?
Which statement best describes the Unix operating system's historical significance?
Signup and view all the answers
In which of the following devices is a Unix-based system NOT commonly found?
In which of the following devices is a Unix-based system NOT commonly found?
Signup and view all the answers
Which security aspect is important when using Unix?
Which security aspect is important when using Unix?
Signup and view all the answers
What substitution has been made in character encoding systems over time?
What substitution has been made in character encoding systems over time?
Signup and view all the answers
Which operating systems are derived from Unix?
Which operating systems are derived from Unix?
Signup and view all the answers
What is the primary purpose of the /dev/initrd in the boot process?
What is the primary purpose of the /dev/initrd in the boot process?
Signup and view all the answers
Which of the following describes a block device?
Which of the following describes a block device?
Signup and view all the answers
What does the kernel do after all drivers have been loaded?
What does the kernel do after all drivers have been loaded?
Signup and view all the answers
How does the system typically handle input and output for character devices?
How does the system typically handle input and output for character devices?
Signup and view all the answers
What occurs during the second phase of the boot process using /dev/initrd?
What occurs during the second phase of the boot process using /dev/initrd?
Signup and view all the answers
What information do devices without drivers receive from the kernel?
What information do devices without drivers receive from the kernel?
Signup and view all the answers
Which command is used to check the permissions of /dev/initrd?
Which command is used to check the permissions of /dev/initrd?
Signup and view all the answers
What will the kernel conduct during its execution routine?
What will the kernel conduct during its execution routine?
Signup and view all the answers
What is the purpose of the Master Boot Record (MBR)?
What is the purpose of the Master Boot Record (MBR)?
Signup and view all the answers
How large is the Master Boot Record (MBR)?
How large is the Master Boot Record (MBR)?
Signup and view all the answers
Where does the BIOS read to initiate the boot process?
Where does the BIOS read to initiate the boot process?
Signup and view all the answers
What is included in the first sector of the hard disk?
What is included in the first sector of the hard disk?
Signup and view all the answers
What is referred to as the 'bootstrap code' in the MBR?
What is referred to as the 'bootstrap code' in the MBR?
Signup and view all the answers
What role does the 'bootstrap code' serve?
What role does the 'bootstrap code' serve?
Signup and view all the answers
What command shuts down a UNIX system immediately?
What command shuts down a UNIX system immediately?
Signup and view all the answers
Which command will reboot a UNIX system immediately?
Which command will reboot a UNIX system immediately?
Signup and view all the answers
What does the MBR check to determine which partition to boot?
What does the MBR check to determine which partition to boot?
Signup and view all the answers
What component follows the MBR in the boot process?
What component follows the MBR in the boot process?
Signup and view all the answers
What does the 'x' character indicate in the /etc/passwd file?
What does the 'x' character indicate in the /etc/passwd file?
Signup and view all the answers
Which UID range is reserved for the root account in UNIX?
Which UID range is reserved for the root account in UNIX?
Signup and view all the answers
What is one consequence of using the kill command indiscriminately?
What is one consequence of using the kill command indiscriminately?
Signup and view all the answers
How is the field in the /etc/passwd file separated?
How is the field in the /etc/passwd file separated?
Signup and view all the answers
What does the '-a' option do in the shutdown command?
What does the '-a' option do in the shutdown command?
Signup and view all the answers
Which field provides additional user information in the /etc/passwd file?
Which field provides additional user information in the /etc/passwd file?
Signup and view all the answers
What happens if a user's home directory does not exist upon login?
What happens if a user's home directory does not exist upon login?
Signup and view all the answers
Which field in the /etc/shadow file represents the minimum number of days between password changes?
Which field in the /etc/shadow file represents the minimum number of days between password changes?
Signup and view all the answers
What does the 'Expire' field in the /etc/shadow file indicate?
What does the 'Expire' field in the /etc/shadow file indicate?
Signup and view all the answers
What does the 'GID' field in the /etc/group file represent?
What does the 'GID' field in the /etc/group file represent?
Signup and view all the answers
What is the status of the password field if it is empty in the /etc/group file?
What is the status of the password field if it is empty in the /etc/group file?
Signup and view all the answers
In the /etc/shadow file, what does the 'Warn' field indicate?
In the /etc/shadow file, what does the 'Warn' field indicate?
Signup and view all the answers
What are the three methods for adding users on a UNIX system?
What are the three methods for adding users on a UNIX system?
Signup and view all the answers
What is the default permission for the /etc/shadow file as shown in the example?
What is the default permission for the /etc/shadow file as shown in the example?
Signup and view all the answers
Study Notes
Unix Operating System
- The term "System Administrator" often implies Unix system administration, even though the same concepts apply across different operating systems.
- Unix history is fascinating, and its development is closely tied to the rise of the internet and related technologies.
- The Unix operating system originated as a platform for Ken Thompson's "Space Travel" game, running on a PDP-7.
- Unix has evolved and is now the foundation for various operating systems, including Linux, Apple's OS X, Android, iOS, and many more.
"Initializing" or "Booting" the Machine
- The boot process begins with the BIOS reading the Master Boot Record (MBR) from Track 0, Sector 1 of the hard disk.
- The MBR is the first software component in the boot procedure on BIOS-based machines.
- The MBR is 512 bytes in size and contains the disk partition tables, executable bootloader code.
MBR
- The MBR contains information about how the hard disk is partitioned.
- It also includes a small program that reads the partition table, identifies the active partition (bootable), and loads the boot sector of that partition.
- The boot sector contains a program that reads the first portion of the operating system and starts it.
/dev/initrd
- The /dev/initrd is a RAM disk device loaded by the boot loader before the kernel starts.
- It represents the initial root filesystem used by the kernel during the first phase of boot.
- Additional drivers or modules are loaded from the initial root device as the kernel initializes.
- A new root filesystem is mounted from a different device once the initial root filesystem is complete.
Block Devices
- Block devices are used to read and write data in blocks.
- Examples include CDROM, hard disks, and floppy disks.
- The
dd
command reads 512 byte blocks, 'dd if=/dev/sda1 of=/dev/null count=1' reads one 512 byte record. - Examples of block devices:
/dev/initrd
,/dev/ram10
Character Devices
- Character devices transmit data one character at a time.
- They are used for stream communication and do not support random access to data.
- Examples of character devices include mice, keyboards, virtual terminals, and serial modems.
- Character devices typically use un-buffered input/output routines.
- Examples of character devices:
/dev/console
,/dev/tty44
Role of the Kernel
- Once drivers are loaded, control is transferred to the kernel.
- The kernel performs several crucial functions:
- Determines the system's memory size.
- Initializes data structures.
- Mounts the root partition.
- Configures hardware.
- The kernel configures information by probing the system bus and querying drivers.
- Devices without drivers are disabled.
Shutdown Command
- The
shutdown
command is used to shut down or reboot the system. -
shutdown -h now
immediately shuts down the system. -
shutdown -r now
immediately reboots the system. -
shutdown -h 20:00
schedules a shutdown at 8:00 PM. -
shutdown -r -t 60
reboots the system in 60 seconds.
Kill Command
- The
kill
command sends a signal to a specific process or process group. - Exercise caution when using
kill
command, especially on jobs involving text editors, databases, mail, or programs with user interaction. -
kill
terminates a job without saving user input or program results.
/etc/passwd File
- It is located at
/etc/passwd
. - It has a colon (:) as the field separator.
- The format is:
Username:Password:UID:GID:UserID:Home directory:Command/shell
- Example:
dandrear:x:1020:1021:dandrear user:/export/home/dandrear:/bin/bash
- Permissions:
-rw-r--r-- 1 root root 1636 Aug 16 10:37 /etc/passwd
/etc/passwd File Fields
- Username: Login name, up to 32 characters.
-
Password:
x
indicates the password is encrypted and stored in/etc/shadow
. - UID: Unique user ID, 0 reserved for root, 1-99 for predefined accounts, 100-999 for system accounts/groups.
-
GID: Primary group ID, stored in
/etc/group
. - UserID Info: Extra information about the user.
- Home directory: Absolute path to the user's home directory.
- Command/shell: Absolute path to the user's shell or command.
/etc/shadow File
- Located at
/etc/shadow
. - Field separator: Colon (:)
- Format:
username:passwd:lastpasswdch:min:max:warn:inactive:expire:unused
- Example:
dandrear:$1$dhBysgdhfteM9gd00:13064:0:99999:7:::
- Permissions:
-r-------- 1 root root 1107 Sep 5 15:24 /etc/shadow
/etc/shadow File Fields
- Username: Login name.
- Password: Encrypted password.
- Last password change: Days since January 1, 1970.
- Minimum: Minimum days between password changes.
- Maximum: Maximum days the password is valid.
- Warn: Days before password expiry when the user receives a warning.
- Inactive: Days after password expiry when the account becomes disabled.
- Expire: Days since January 1, 1970 when the account becomes disabled (absolute date).
- Unused: Unused field.
/etc/group File
- Located at
/etc/group
. - Field separator: Colon (:)
- Format:
Group name:Password:GID:User_list
- Example:
faculty:x:410:
,staff:x:430:
- Permissions:
-rw-r--r-- 1 root root 833 Aug 16 10:37 group
/etc/group File Fields
- Group name: Name of the group.
- Password: Encrypted group password, empty for no password.
- GID: Numerical group ID/unique identifier.
- User_list: List of group members, separated by commas.
Adding Users on a System
- Three methods for adding users:
- Manually through the system interface.
- Using the
useradd
command. - Using the
adduser
command.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
Explore the intricacies of the Unix operating system and its historical significance. Additionally, delve into the boot process, focusing on the Master Boot Record (MBR) and its role in initializing machines. This quiz covers critical concepts that underpin modern operating systems.