Basic Administration - PowerPoint PPT Presentation

1 / 41
About This Presentation
Title:

Basic Administration

Description:

Manage processes on Linux using basic commands ... File system journaling is a feature that protects against data corruption by ... – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Slides: 42
Provided by: jimb192
Category:

less

Transcript and Presenter's Notes

Title: Basic Administration


1
Chapter 8
  • Basic Administration
  • Tasks

2
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
Managing User Accounts
Valued Gateway Client
  • 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
Types of User Accounts
Valued Gateway Client
  • Types of user accounts include
  • root account
  • Regular accounts
  • Special accounts

5
The root Account
Valued Gateway Client
  • 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
Regular Users
Valued Gateway Client
  • 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
Special Users
Valued Gateway Client
  • Special accounts cannot be used to log in
  • Special accounts are used by programs running on
    Linux

8
Linux Groups
Valued Gateway Client
  • 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
A User as a Member of Multiple Groups
10
User and Group Files
Valued Gateway Client
  • 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
Shadow Passwords
Valued Gateway Client
  • 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
Creating New User Accounts
Valued Gateway Client
  • 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
Configuring Users Graphically in Red Hat Linux 7.3
14
useradd Command Options
15
Changing User Passwords
Valued Gateway Client
  • A password is not defined by useradd when a new
    user account is created
  • The passwd command is used to define or change a
    users password
  • You must enter the new password twice

16
Creating New Groups
Valued Gateway Client
  • To create a new group, use the groupadd command
  • To add a new group, include the group name as a
    parameter

17
Modifying User and Group Accounts
Valued Gateway Client
  • 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
Automating Home Directory Creation
Valued Gateway Client
  • Files contained in /etc/skel are automatically
    copied into each users home directory at the
    time you create the account
  • You should place files in /etc/skel when you
    first install Linux

19
Disabling User Accounts
Valued Gateway Client
  • You can temporarily or permanently disable a user
    account
  • Accounts can be deleted using the userdel command
  • To temporarily disable a users account, change
    the password with the passwd command

20
Maintaining File Systems
Valued Gateway Client
  • 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
Automatically Mounted File Systems
22
File Systems Mounted in a Linux Directory
Structure
23
Checking File System Status
Valued Gateway Client
  • 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
Creating New File Systems
Valued Gateway Client
  • 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
Using the fdisk Utility
Valued Gateway Client
  • 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
fdisk Commands
27
Sample Output of the p Command in fdisk
28
Formatting File Systems
Valued Gateway Client
  • 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
Mounting File Systems
Valued Gateway Client
  • 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
Unmounting File Systems
Valued Gateway Client
  • 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
Automating File System Mounting
Valued Gateway Client
  • 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
Option Field Settings for the mount Command
33
Managing Swap Space
Valued Gateway Client
  • 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
Setting Quotas on Disk Usage
Valued Gateway Client
  • 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
Simple Task Management
Valued Gateway Client
  • To control processes running on Linux, you can
    use the following
  • The ps command
  • The bg command
  • The fg command

36
Job Control in the Shell
Valued Gateway Client
  • 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
Using Virtual Consoles
Valued Gateway Client
  • 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
Learning about Processes
Valued Gateway Client
  • 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
Controlling Processes
Valued Gateway Client
  • 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
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
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
Write a Comment
User Comments (0)
About PowerShow.com