Presentation is loading. Please wait.

Presentation is loading. Please wait.

Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.

Similar presentations


Presentation on theme: "Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks."— Presentation transcript:

1 Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks

2 Guide to Linux Installation and Administration, 2e2 Objectives In this chapter, you will: Create and manage Linux user accounts Install and maintain types of Linux systems Manage processes on Linux using basic commands

3 Guide to Linux Installation and Administration, 2e3 Managing User Accounts To complete any operation in Linux, a person must first log in using a valid user account name and password Setting up and maintaining these user accounts is an important part of the work of a system administrator

4 Guide to Linux Installation and Administration, 2e4 Types of User Accounts Types of user accounts include: –root account –Regular accounts –Special accounts

5 Guide to Linux Installation and Administration, 2e5 The root Account The administrative account (the superuser) on a Linux system is named root The root user can perform any operation on a Linux system The su utility (for substitute user) temporarily changes your access rights to those of another user

6 Guide to Linux Installation and Administration, 2e6 Regular Users Regular user accounts are for users who log in at a keyboard and use the Linux system Regular user account names typically use a combination of first name or initial and last name or initial

7 Guide to Linux Installation and Administration, 2e7 Special Users Special accounts cannot be used to log in Special accounts are used by programs running on Linux

8 Guide to Linux Installation and Administration, 2e8 Linux Groups A group is a collection of user accounts that can be collectively granted access to files and directories A user can be a member of multiple groups, but can only have one primary group A User Private Group system creates a group with a single member for each new user account

9 Guide to Linux Installation and Administration, 2e9 A User as a Member of Multiple Groups

10 Guide to Linux Installation and Administration, 2e10 User and Group Files User account information is stored in the file /etc/passwd To edit the /etc/passwd file, use the special editing program vipw Groups on a Linux system are defined in /etc/group To edit the /etc/group file, use the command vigr

11 Guide to Linux Installation and Administration, 2e11 Shadow Passwords Encrypted passwords are stored in /etc/shadow Regular users cannot read encrypted passwords Shadow Password Suite is a collection of password-related programs that have been modified to recognize the /etc/shadow file

12 Guide to Linux Installation and Administration, 2e12 Creating New User Accounts New user accounts can be created –With the useradd command –With various graphical utilities Default settings apply when using the useradd command alone Default settings can be modified on the command line or by editing a configuration file for useradd

13 Guide to Linux Installation and Administration, 2e13 Configuring Users Graphically in Red Hat Linux 7.3

14 Guide to Linux Installation and Administration, 2e14 useradd Command Options

15 Guide to Linux Installation and Administration, 2e15 Changing User Passwords A password is not defined by useradd when a new user account is created The passwd command is used to define or change a user’s password You must enter the new password twice

16 Guide to Linux Installation and Administration, 2e16 Creating New Groups To create a new group, use the groupadd command To add a new group, include the group name as a parameter

17 Guide to Linux Installation and Administration, 2e17 Modifying User and Group Accounts The usermod command allows you to modify user account parameters stored in /etc/passwd or /etc/shadow The groupmod command lets you modify membership of a group

18 Guide to Linux Installation and Administration, 2e18 Automating Home Directory Creation Files contained in /etc/skel are automatically copied into each user’s home directory at the time you create the account You should place files in /etc/skel when you first install Linux

19 Guide to Linux Installation and Administration, 2e19 Disabling User Accounts You can temporarily or permanently disable a user account Accounts can be deleted using the userdel command To temporarily disable a user’s account, change the password with the passwd command

20 Guide to Linux Installation and Administration, 2e20 Maintaining File Systems File system refers to an organized set of data that can be accessed via the standard Linux directory structure To access a file system in Linux, it must first be mounted into the root directory structure A mount point is the path in the directory structure where you access the data in a file system Use the mount command to make a new file system accessible via a mount point

21 Guide to Linux Installation and Administration, 2e21 Automatically Mounted File Systems

22 Guide to Linux Installation and Administration, 2e22 File Systems Mounted in a Linux Directory Structure

23 Guide to Linux Installation and Administration, 2e23 Checking File System Status The df command displays space usage information for each file system that is currently mounted The du utility lists the size of a directory and all its subdirectories You can use various graphical tools and system administration scripts to check the status of file systems

24 Guide to Linux Installation and Administration, 2e24 Creating New File Systems You can install new file systems that are permanent or temporary File systems can be stored on a device with removable media or fixed media Once the hard disk or other device is installed, you can use the Linux fdisk command to examine its partitions, creating new Linux partitions

25 Guide to Linux Installation and Administration, 2e25 Using the fdisk Utility To manage partitions in Linux after the operating system is installed, use the fdisk utility The fdisk utility can configure partition data on a hard disk Your modifications to the partition table are only effective when you write the changes to disk with the w command to exit fdisk

26 Guide to Linux Installation and Administration, 2e26 fdisk Commands

27 Guide to Linux Installation and Administration, 2e27 Sample Output of the p Command in fdisk

28 Guide to Linux Installation and Administration, 2e28 Formatting File Systems File system journaling is a feature that protects against data corruption by tracking each “write” to the hard disk in a special way so that it will either be completely finished or left completely undone New partitions must be formatted using mke2fs or mkswap before they can be used

29 Guide to Linux Installation and Administration, 2e29 Mounting File Systems After you have formatted a file system, you can mount it To access a file system, you use the mount command The floppy disk drive and CD-ROM drive are mounted to /mnt/floppy and /mnt/cdrom

30 Guide to Linux Installation and Administration, 2e30 Unmounting File Systems To unmount a file system, use the umount command with the device name or mount point A file system cannot be in use when you unmount it

31 Guide to Linux Installation and Administration, 2e31 Automating File System Mounting The new file systems that you create from additional hard disks or other devices can also be automatically mounted at boot time The key to automounting file systems is the /etc/fstab configuration file which contains one line for each file system that you want to have automounted when Linux boots

32 Guide to Linux Installation and Administration, 2e32 Option Field Settings for the mount Command

33 Guide to Linux Installation and Administration, 2e33 Managing Swap Space The swap space is a special partition type used by the Linux kernel for virtual memory You can use the mkswap command to format a swap partition Swap space is activated by the swapon command within the system initialization scripts The vmstat command displays current status details for how virtual memory is being used

34 Guide to Linux Installation and Administration, 2e34 Setting Quotas on Disk Usage Limits on the amount of hard disk space that any user or group can use are called disk quotas Use the edquota command to establish a quota for one or more users or groups Activate the quota system using the quotaon command

35 Guide to Linux Installation and Administration, 2e35 Simple Task Management To control processes running on Linux, you can use the following: –The ps command –The bg command –The fg command

36 Guide to Linux Installation and Administration, 2e36 Job Control in the Shell When you start a program, that program takes control of the command line where you are working The jobs command lists all jobs or processes that are running from the current shell The fg command places processes in the foreground The bg command places processes in the background command

37 Guide to Linux Installation and Administration, 2e37 Using Virtual Consoles A virtual console is a separate login screen that you access by pressing a combination of keys on your keyboard A virtual console allows you to start multiple text- based login sessions on the same computer The virtual consoles are assigned to the function keys

38 Guide to Linux Installation and Administration, 2e38 Learning about Processes A simple ps command shows you only the commands that you have started in the current command-line environment Multiple processes can be started from a single shell

39 Guide to Linux Installation and Administration, 2e39 Controlling Processes The kill command is used to kill, or end, processes Signals are messages that can be sent between processes The killall command sends a signal to all processes started by a given command

40 Guide to Linux Installation and Administration, 2e40 Summary Types of user accounts include root, regular accounts, and special accounts New user accounts can be created with the useradd command or with various graphical utilities New groups can be created with the groupadd command File systems are accessed by using the mount command to specify a device and a mount point The df and du commands display status and size information about file systems

41 Guide to Linux Installation and Administration, 2e41 Summary The fdisk utility can configure partition data on a hard disk. The vmstat command displays how virtual memory is being used Within a shell, the jobs command manages these processes, placing them in the foreground or background Virtual consoles let you log in at multiple independent text-mode screens The kill command sends signals to processes or to the Linux kernel when necessary to end a process


Download ppt "Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks."

Similar presentations


Ads by Google