You are on page 1of 0

1

RedHat Linux System Administration

REDHAT

REDHATLINUXSYSTEMADMINISTRATION

AhmedGamilAbbass |Ver.1

RedHattLinuxSy
ystemAd
dministraation
SysttemInitia
alization
Boott Sequencee Overview
w
1.
2.
3.
4.

BIOS Inittialization
Boot Loa
ader
Kernel in
nitialization
init startts and ente
ers desired run
r level byy executing
g:
/e
etc/rc.d/
/rc.sysin
nit
/e
etc/rc.d/
/rc and /etc/rc.d
d/rc?.d/
/e
etc/rc.d/
/rc.local
l
X Display Ma
anager if ap
ppropriate


H.W
W. cheeck (POST)
bios


OS

OS
S

boot looader

check
kernel kernel
OS

.1
.2
.3
.4

1 BIOS In
1.
nitializatio
on


H.W. Devices deteect PO
OST (power on self test) Bios



IRQ device


boot portable
p
devvices ROM cheeck

boot looader IPL
L (initial product load)

By: Ahmed Gamil

Page 2

RedHattLinuxSy
ystemAd
dministraation
Masster Boot Record
R


HDD boot
H
MBR
)R (master Booot Record


.1 boot loadder
.2 partition tabble
/devv/hda

recoveryy

Magic
M
.3 Numbber
/sbin/grub-install /dev/hd
reinstall da
r
MBR /dev/hdaa

Boott Loader
OS
commands

LIL
GRU LO
UB

initrd imag
commannds kernel ge
/etc/grubb.conf shortcutt
GRUB
bootloadder
/booot/grub/grubb.conf :
) MBR (masster boot record
.i


/dev/h
hda
GRUB

Page 3

LILO
O

By: Ahmed Gamil

RedHatLinuxSystemAdministration
.ii partition table
commands
/boot/grub/grub.conf
GRUB :
kernel load
GRUB /etc/grub.conf

?How the GRUB call the kernel


)1) Load initrd (initial RAM drive
initrd grub RAM kernel


2) Load kernel
3) Mount / in read only
kernel ) ( / read only check
4) Remount / in read & write
grub ) ( / read & write
5) Call /sbin/init

Page 4

By: Ahmed Gamil

RedHatLinuxSystemAdministration
Advantages of Grub:
1. Command-line interface available at boot prompt
2. Boot from ext2/ext3, ReiserFS, JFS, FAT, minix, or FFS file systems
ext3,2 file sys boot
3. Supports MD5 password protection
password
4. support all OS
OS
The stages of GRUB
Stage1

Written within the 512 bytes of the MBR.


Call the next stage (stage1_5 or stage2). /boot/grub

[root@localhost grub]# file stage1


stage1: x86 boot sector, code offset 0x48
Stage1_5

Deals with specific types of file systems


GRUB may not need to load stage1_5 depending on the types of file systems
present.

Stage2

This is the main GRUB image,


Exist on /boot/grub/stage2.
It reads the /boot/grub/grub.conf file for configuration information that details
how it will load the kernel.
Allow you to troubleshoot, re-install, or modify how GRUB works.
Present the user with a graphical boot menu entry
Specifies the kernel to load and the initrd image file with all of the modules to
load for your system.
Here is a typical grub.conf file for Red Hat Linux:

Kernel
wireless
kernel kernel
modules modules devices kernel
drivers devices kernel

By: Ahmed Gamil

Page 5

RedHatLinuxSystemAdministration
Kernel boot time functions
1. Device detection
2. Device driver initialization
3. Mounts root file system read only
4. Loads initial process (init)

INIT

Init is the first process running on your system.


Reads its configuration from the /etc/inittab file,
Executes /etc/rc.d/rc.sysinit,
Then boots into the runlevel as defined in /etc/inittab.
After change the inittab configuration we should type : initq or kill hup 1

run level OS init


services functions environment runlevel
run level
run level 3 network troubleshoot
run level 1 root password
N.W. startup application service
/etc/rc.d/rc.sysinit <--------- startup DNS
:
/etc/rc.sysinit
/etc/rc?.d/

By: Ahmed Gamil

Page 6

RedHatLinuxSystemAdministration
/etc/rc.local
X Display Manager if appropriate

Has some tasks :

Sets the system clock


Loads keymaps
Enables swap partitions
Sets hostname
Root filesystem check and remount
Activate RAID and LVM devices
Enable disk quotas
Check and mount other filesystems
Cleans up stale locks and PID files

By: Ahmed Gamil

Page 7

RedHatLinuxSystemAdministration
The inittab file /etc/inittab :

Runlevels : Show the previous and current runlevel with /sbin/runlevel

Each run level has a corresponding directory: /etc/rc.d/rcX.d


The System V init scripts reside in: /etc/rc.d/init.d
Controlling Services
service
ntsysv -- level 3
service
chkconfig -- level 3 Bluetooth on
service
chkconfig -- list Bluetooth

By: Ahmed Gamil

Page 8

RedHatLinuxSystemAdministration
If a user forgets its password
The GUI screen for booting Linux press enter.

press Enter

By: Ahmed Gamil

Page 9

RedHatLinuxSystemAdministration

will show you the boot loader, kernel and initrd details, press e

It enters to grub edit give a space after / rhgb quiet and enter 1

By: Ahmed Gamil

Page 10

RedHatLinuxSystemAdministration

press enter
b to boot the Linux in single user mode.

By: Ahmed Gamil

Page 11

RedHatLinuxSystemAdministration

Enter sh-3.2# passwd

By: Ahmed Gamil

Page 12

RedHatLinuxSystemAdministration

updated the root user password and press exit

By: Ahmed Gamil

Page 13

RedHatLinuxSystemAdministration
Set GRUB boot loader password
Grub Password root password
Pass
/sbin/grub-md5-crypt

Password vi /boot/grub/grub.conf grub.conf

password md5 $5Hhd9D4HEO7$%df8fHdLO9PDjU70


By: Ahmed Gamil

Page 14

RedHatLinuxSystemAdministration

reboot

Booting the RedHat installation CD/DVD Grub Password


recovery mode
installation grub

By: Ahmed Gamil

Page 15

RedHatLinuxSystemAdministration

Grub Trouble-shooting Grub



.1 Rescue Mode
.2 Grub

5
boot Linux Rescue F5 Enter

loading initrd.img loading vmlinuz


Page 16

By: Ahmed Gamil

RedHatLinuxSystemAdministration

Page 17

By: Ahmed Gamil

RedHatLinuxSystemAdministration



Yes IP Adress Subnet Mask
NO

Rescue

Page 18

By: Ahmed Gamil

RedHatLinuxSystemAdministration

Read only
Continue


mount )( /mnt/sysimage
Enter console Shell
/mnt/sysimage /
) shell ( exit
OK

Page 19

By: Ahmed Gamil

RedHatLinuxSystemAdministration

curser shell sh-2.05b# shell


chroot /mnt/sysimage Enter

Grub grub-install /dev/hda

grub MBR
Exit chroot /mnt/sysimage
Exit /mnt/sysimage Shell rescue mode
reboot
Grub


Root CD mount file sys /mnt/sysimage
root )/mnt/sysimage/(grub,etc,.
mnt directory root

Chroot /mnt/sysimage

install grub

Grup-install /dev/had

:

Grub
)Grub >root (hda0,0
)Grub >setup (hda0
Page 20

By: Ahmed Gamil

RedHatLinuxSystemAdministration
Program installation
distribution package manager
package manager redhat fedora )RPM (RedHat package manager
Package name ver arch .rpm amsn-0.98.3-2.fc14.i686.rpm
packagePackagename-version-release.architecture.rpm ------------:

-Packagename
- version , ... ,
- release ) , ... ,
- architecture , :
o Noarch ,

o 1386 , 32 bit X68
o I586 , Pantium I
AMD
o I686 , , , , Intel
Pentium II, Intel Pentium III, Intel Pentium 4 ,
AMD Athlon,AMD Duron
o X86_64 , 46 bit AMD Athlon64, AMD
)Opteron, Phenom and Intel EM64T (Core 2 Duo, Core 2 Quad
o Ppc , 32 bit IBM POWER, IBM eServer
pSeries, and IBM eServer iSeries

processor
package
uname p processor
cat /etc-redhat-release

component -: RPM
1. Local database:

Page 21

By: Ahmed Gamil

RedHatLinuxSystemAdministration
install packages
/var/lib/rpm permission ownership

2. rpm and related executables


rpm package
3. RPM front ends such as yum
4. package files
rpm
RPM Commands
Install Package
install:
rpm -ivh name-version-release-arch.rpm
update install packege
rpm -Uvh name-version-release-arch.rpm
update install packege

By: Ahmed Gamil

Page 22

RedHatLinuxSystemAdministration
rpm -Fvh name-version-release-arch.rpm
rpm
rpm -ivh http://xxx.yyy.zzz/name-version-release-arch.rpm
Erase Package
:
rpm -e name
.

: kernel driver kernel update


kernel update rpm F rpm U

kernel initrd vmlinuz rpm i


Package Query
system rpm
rpm -qa
install package
rpm -q mplayer
rpm
rpm -qi mplayer

By: Ahmed Gamil

Page 23

RedHatLinuxSystemAdministration
file package
rpm -qf /bin/tracerote
package files
rpm -ql package_name
info package sys
rpm -qip name-version-release-arch.rpm
files package install
rpm -qlp name-version-release-arch.rpm

Package Verification
verification package package
permissions oners
verification rpm package data base rpm
package system private key redhat
package public key
.1 package
>rpm -V <package_name
rpm -Vp <package_file>.i386.rpm
rpm Va

Page 24

By: Ahmed Gamil

RedHatLinuxSystemAdministration

package .2
/etc/pki/rpm-gpg/ data base rpm public key import .a
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY
import package key .b
rpm -K <package_file>.i386.rpm

public key

By: Ahmed Gamil

Page 25

RedHatLinuxSystemAdministration

.3 md5 keys
md5 file

SRPM RPM
Rpmbuild package.src.rpm

/usr/scr/redhat

Page 26

By: Ahmed Gamil

RedHatLinuxSystemAdministration
YUM
yum repository package libraries
yum repos

rpm package install repo


configuration file /etc/yum.repo.d <------

configuration file yum


key check

yum configuration
yum yum configuration /etc/yum.conf <-------

repo configuration file

yum configuration

Page 27

By: Ahmed Gamil

RedHatLinuxSystemAdministration

Yum commands
package install
yum install package
sys packages update
yum update
package update
yum update package
package
yum erase package
yum info package
yum search package
yum list (all|available|extras|installed|recent|updates)
rpm -qf install package file
yum whatprovides file

By: Ahmed Gamil

Page 28

RedHatLinuxSystemAdministration
repo server package createrepo
directory rpms
createrepo -v /directory
directory repo xml rpms
package yum
configuration file
:
.1 install ftp server vsftpd
rpm -ivh vsftpd.rpm
.2 service vsftpd
Service vsftpd start

ps -e vsftpd

.3 install createrepo
rpm -ivh createrepo
.4 rpm packages server redhat server
cp /var/ftp/pub/server /new-repo-server/rpm
.5 directory rpm repo
createrepo v //tpserver/rpm

Page 29

By: Ahmed Gamil

RedHatLinuxSystemAdministration
System Logging
syslog.conf logs
/etc/syslog.conf

/var/log log logs


:
/var/log/messages .> System error messages
/var/log/secure . > Security, authentication, and xinetd messages
/var/log/dmesg ..> Kernel boot messages
/var/log/maillog > Mail system messages

By: Ahmed Gamil

Page 30

RedHatLinuxSystemAdministration

log files test


/var/log/messages log messages .1

By: Ahmed Gamil

Page 31

RedHatLinuxSystemAdministration
this message for test log test .2

message .3

Centralized Log Server

By: Ahmed Gamil

Page 32

RedHatLinuxSystemAdministration
: centralized log server
hacking server hacker logs
centralized server logs servers
centralized server
) : log files (/etc
syslogd .1 log files users /etc/sysconfig/syslog
klogd .2 log files kernel /etc/sysconfig/syslog

centralized server server
/etc/sysconfig/syslog users

user /etc/syslog.conf
log file logs

Page 33

By: Ahmed Gamil

RedHatLinuxSystemAdministration
Facility.priority distination
mail , authentication, etc log facility .1
logs priority .2
log file logs destination .3
/var/log
*.*@ server ip Facility.priority distination centralized server

By: Ahmed Gamil

Page 34

RedHatLinuxSystemAdministration
)INODES (index node
sys
inode
X 56689
inodes inode table 1M
file
directory inode table file directory file
files
:



Inode table for file

Inode table for directory


Inode no.

Inode no.

Permissions

Permissions

Access type

Access type

Creation time

Creation time

Modification time

Modification time

Link count

Link count :

File type

File type: b: data transferred block by block like H.D.

File 1 = 56689

c: data transferred char. by char. like CD ROM

File 2 = 56685

file: data transferred file by file

File 3 = 56682

dir: data transferred file by file like CD ROM

INODE
blocks block ) 1k ( 8 inodes
Inode 128 byte
inode block mke2fs -j -b 2048 -i 2048
.1 128

Page 35

By: Ahmed Gamil

RedHatLinuxSystemAdministration
.2 128 inode 128 byte
unused
cut partition partition data pointer
inodes
cut partition partition data inodes
pointer
hard link file partition
inode
soft link file partition
inode
inode ls li
inodes file system df i
inode block mke2fs -j -b 2048 -i 2048

Page 36

By: Ahmed Gamil

RedHatLinuxSystemAdministration
MOUNT
mount access device
devices /dev mount point
.....device
/dev/sdb1
mount directory directory
directory directory mount point
mount
point

Mount commands
mount
.1 device name
mount -t type dev mountpoint
.2 label
mount -t type LABEL= (label name) mountpoint
.3 UUID
mount U uuid mountpoint
: device name
mount sdc1 /media

Page 37

By: Ahmed Gamil

RedHatLinuxSystemAdministration

umount mount

fat , ntfs, ext2,ext3 device file sys


fdisk -l

vfat fat32

By: Ahmed Gamil

Page 38

RedHatLinuxSystemAdministration
file system fdisk

: label

Page 39

By: Ahmed Gamil

RedHatLinuxSystemAdministration
label device e2label

: UUID
UUID universal unique ID partition
UUID partitions blkid


mount restart /etc/fstab
system

Page 40

By: Ahmed Gamil

RedHatLinuxSystemAdministration

option
permissions partition
)Read only, read - write, exe, no exe, default (read-write + exe
file system check order
check file system 0:9 check
restart 100 partition
: 0 check
dump order
backup system
fstab system
restart system
mount -a

Page 41

By: Ahmed Gamil

RedHatLinuxSystemAdministration

) LBA (logical block addressing


partitions 4


3 primary + 1 extended extended partitions 63 partition
logical partitions

extended 4 primary
IDE hard 4 partitions had, hdb, hdc, hdd partition
hda1, hda2, hda3,hda4 hdb1,
grub

GRUB

Page 42

SCASI

IDE

By: Ahmed Gamil

RedHatLinuxSystemAdministration

Hda1

hda2

hda3

hda4

sda1

sda2

sda3

Sda4

hda0

hda1

hda2

hda3

Hdb1

hdb2

hdb3

hdb4

sdb1

sdb2

sdb3

Sdb4

hdb0

hdb1

hdb2

hdb3

Hdc1

hdc2

hdc3

hdc4

sdc1

sdc2

sdc3

Sdc4

hdc0

hdc1

hdc2

hdc3

Hdd1

hdb2

hdd3

hdd4

sdd1

sdb2

sdd3

Sdd4

hdd0

hdb1

hdd2

hdd3


fdisk .1
disk druid .2
CLI parted .3
GUI gparted .a
GUI qtparted .b
Referencing ext3 ext2 file system partition

Partitioning Commands
ext2 file sys
mkfs /dev/sda1
mkfs.ext2 /dev/sda1
mke2fs /dev/sda1
ext3 file sys
mkfs t ext3 /dev/sda1
mkfs.ext3 /dev/sda1
mke2fs j /dev/sda1 ------------ j for journal
mount device bad blocks check
mke2fs c /dev/sda1

By: Ahmed Gamil

Page 43

RedHatLinuxSystemAdministration

fsck /dev/sdd1

mount check

disk free space df h partitions

By: Ahmed Gamil

Page 44

RedHatLinuxSystemAdministration
fdisk l file systems - 1 : partition

By: Ahmed Gamil

Page 45

RedHatLinuxSystemAdministration
Journaling
ext3 = ext2 + journaling
journaling features ext2 :

lost + found journaling
journaling ext3 data memory
HD data
ext2 :
3 X = 700M, Y=500M,Z=12M
pause
:

Y=200

X=500

Z=12

Y=300

X=200

ext3 journaling

Z=12

Page 46

Y=500

X=700

By: Ahmed Gamil

RedHatLinuxSystemAdministration
)RAID (Redundant Array Of Independent Disk
HD HD

: Raid
RAID 5

RAID 1

RAID 0

data HD

data HD

data 2HD

HD

HD HD

2HD
performance

performance data storage


parity check

performance

sum of data HD

data storage

data storage
HD data

data parity
HD
HD

raid
.1 3 partitions
.2 raid device
.3 mount raid device data
.4 simulation failure partitions
.5 partitions array partition data

Page 47

By: Ahmed Gamil

RedHatLinuxSystemAdministration

By: Ahmed Gamil

Page 48

RedHatLinuxSystemAdministration
device raid array partitions .2

array

ext3 array device

By: Ahmed Gamil

Page 49

RedHatLinuxSystemAdministration
.3 mount device

array big file

.4 partitions failure

.5 array

partition

Page 50

By: Ahmed Gamil

RedHatLinuxSystemAdministration

raid
raid device unmount .1

partitions fail .2

partitions remove .3

By: Ahmed Gamil

Page 51

RedHatLinuxSystemAdministration

raid array .4

By: Ahmed Gamil

Page 52

RedHatLinuxSystemAdministration
SWAP
RAM virtual memory
RAM real time
virtual memory swap file partition
RAM SWAP = 2*RAM
Mem free m

swap : partition file


.1 partition
partition partition
partition swap
file system swap swap :

mount partition mkswap swap


reboot partition
/etc/fstab

Page 53

By: Ahmed Gamil

RedHatLinuxSystemAdministration

swap

swap swapoff /dev/sdb1

.2 file
file swapfile
file
file swap
file /etc/fstab

Page 54

By: Ahmed Gamil

RedHatLinuxSystemAdministration

file /etc/fstab partition


swap partition

Page 55

By: Ahmed Gamil

RedHatLinuxSystemAdministration
Quota
quota user group
directories file sys mount file sys
fstab
file sys Quota Quota implemented kernel
Quota :
.1 ) Quota (sts
.2 ) users (groups
:
.1 mount partition fstab mount
.2 Quota aquota.user aquota.group
.3 sys aqouta.user aquota.group quota
.4 Quota quotaon quotaoff
.5
:
.1 mount partition fstab mount

fstab

Page 56

By: Ahmed Gamil

RedHatLinuxSystemAdministration
.2 Quota aquota.user aquota.group

.3 sys quota /data aqouta.user aquota.group


quota
quotacheck
.

quotacheck
aquota.user aquota.group

.4 Quota quotaon quotaoff

Page 57

By: Ahmed Gamil

RedHatLinuxSystemAdministration
:
user ahmed quota

user

features quota :
: grace soft limit files
hard limit
grace edquota -u ahmed -t

Page 58

By: Ahmed Gamil

RedHatLinuxSystemAdministration

user quota quota ahmed quota

quota user quota user


edquota p ahmed u ali
report quota repquota /test

Page 59

By: Ahmed Gamil

RedHatLinuxSystemAdministration

quota
wornquota
Mail users /etc/warnquota.conf

Page 60

By: Ahmed Gamil

RedHatLinuxSystemAdministration
LVM (Logical volume management)
resizable LVM

device physical volumes (logical partitons)


logical volumes volume group
4M extent extent partition volume group
logical extents logical volumes volume group
partitions

LV partition
logical partitions .1
volume group physical volume Logical partition .2
volume group physical volume .3
logical volume volume group .4

By: Ahmed Gamil

Page 61

RedHatLinuxSystemAdministration

vgdisplay vg

By: Ahmed Gamil

Page 62

RedHatLinuxSystemAdministration

4M physical extent 200M vg size


physical volume logical partition VG
vgextend vgcreate

By: Ahmed Gamil

Page 63

RedHatLinuxSystemAdministration
lv vgdisplay

LV lvreduce

lv vgdisplay

Page 64

By: Ahmed Gamil

RedHatLinuxSystemAdministration

vg

/etc/lvm/lvm.conf lvm

By: Ahmed Gamil

Page 65

RedHatLinuxSystemAdministration
BACKUP
backup . backup
HD
Remote Server DVD CD
: BACKUP
zip, tar, blocklevel (dd), dump&restore, remote sync (rsync)
(file, directory) backup
FILE

DIRECTORY

gzip filename

tar cvf file.tar /dir

gunzip filename

tar xvf file.tar /dir

bzip2 filename

tar cvfz file.tar.gz

bunzip2 filename

tar xvfz file.tar.gz


tar cvfj file.tar.bz2
tar xvfj file.tar.bz2
ZIP COMPRESSION
.

gzip ahmed
ahmed ahmed.gz ahmed
gunzip ahmed.gz
gzip
bzip2 ahmed
ahmed.gz2 gzip compression ratio ahmed
bunzip2 ahmed
bzip2

By: Ahmed Gamil

Page 66

RedHatLinuxSystemAdministration

)tar (Tape Archive


tar :

) c (create .

) x (extract .

) r (append .

) t (list .

) d (different .

) u (update .

) v (verbose .

) k (keep old file .

) f (file .

tar cvf myhome.tar /home

Page 67

By: Ahmed Gamil

RedHatLinuxSystemAdministration
Home myhome.tar

tar xvf myhome.tar



)(/

tar czvf myhome.tar.gz /home


Home myhome.tar
gzip

tar xzvf myhome.tar.gz


gzip

tar cjvf myhome.tar.gz /home


Home myhome.tar
bzip2

tar xzvf myhome.tar.gz


bzip2

Page 68

By: Ahmed Gamil

RedHatLinuxSystemAdministration

By: Ahmed Gamil

Page 69

RedHatLinuxSystemAdministration
)Block Level (dd
backup dd
dd if= /dev/sda13 of= /data/file.img
backup backup data block

Dump and Restore

Page 70

By: Ahmed Gamil

RedHatLinuxSystemAdministration
dump
back up backup backup
dump -0uf /distinationfile /sourcefile
dump -1uf /distinationfile /sourcefile
0 level 0 full backup
1 differential backup backup
u update dump
/etc/dumpdates backup
f backup file
: destination partition dump
) (overwrite
: dump
.1 compression ratio
.2 files filesys ext2 ext3
.3 unmounted filesys read only
restore restore
cd /sourcefile
restore -rf /destinationfile.fullbak
backup parent
directory backup file
restore -xf /destinationfile.fullbak
backup
restore tf /destinationfile
backup
restore if /destinationfile
prompt restore
ls cd

Page 71

By: Ahmed Gamil

RedHatLinuxSystemAdministration

rebuild r
extract x
list t
interactive i

rsync (remote sync)


scp
rsync /sourcefile /destinationfile
rsync http: /destinationfile

By: Ahmed Gamil

Page 72

RedHatLinuxSystemAdministration
NETWORK CONFIGURATION
alias localhost.localdomain hostname machine
hostname loobback

127.0.0.1 loobback interface NETWORK


ifconfig ip

By: Ahmed Gamil

Page 73

RedHatLinuxSystemAdministration
system-config-network network configuration

NW
/etc/sysconfig/network-scripts/ifcfg-eth0

By: Ahmed Gamil

Page 74

RedHatLinuxSystemAdministration
edit dhcp ip address

By: Ahmed Gamil

Page 75

RedHatLinuxSystemAdministration
hardware device mac address

By: Ahmed Gamil

Page 76

RedHatLinuxSystemAdministration
DNS DNS

DNS /etc/resolv.conf

: network
Service network restart

Page 77

By: Ahmed Gamil

RedHatLinuxSystemAdministration
NW ifdown eth0 ifup eth0
NW file
/etc/sysconfig/network

Page 78

By: Ahmed Gamil

RedHatLinuxSystemAdministration
dns table IP
/etc/hosts


IP
cash memory
/etc/hosts
DNS server
IP /etc/hosts

Page 79

By: Ahmed Gamil

RedHatLinuxSystemAdministration
SPECIAL PERMISSIONS

USER ROOT )SUID (SET USER ID
USERS GROUP )SGID (SET GROUP ID
USER STIKY BIT

user useradd
user userdel user /home
user userdel r groups
user pass

Page 80

By: Ahmed Gamil

RedHatLinuxSystemAdministration
useradd
optins
-d
-s
-p
-g
-m
-u
-e
-o
] usermod [option ] [account
optins
-d
-s
-p
-l
-L
-U
-g
-m
-u
-e

Page 81

By: Ahmed Gamil

RedHatLinuxSystemAdministration
ACL (access control list)
user file sys permissions
ACL file sys

By: Ahmed Gamil

Page 82

RedHatLinuxSystemAdministration
PRINTER SETTING
cups (common unix printing sys) printing service
system-config-printer printer
/etc/cups/printer.conf < ----- printer

ppd WIN printer

By: Ahmed Gamil

Page 83

RedHatLinuxSystemAdministration
NFS (Network File Services)
linux linux share
shared folders server mount
mkdir /mnt/server1
mount -t nfs 192.168.0.254:/var/ftp/pub /mnt/server1
/etc/init.d/netfs nfs

By: Ahmed Gamil

Page 84

RedHatLinuxSystemAdministration
NIS (Network Information Service)
domain server Remote Connection
system-config-authentication ------- .1
NIS Setting

authconfig-tui .2

By: Ahmed Gamil

Page 85

RedHatLinuxSystemAdministration
SELINUX
system run secured domains
SELinux :
disabled -1 SELinux .
: Permissive -2 SELinux
context /var/log/messeges
.
: Enforcing -3 SELinux
context .
selinux getenforce

selinux system-config-securitylevel

Page 86

By: Ahmed Gamil

RedHatLinuxSystemAdministration
/etc/sysconfig/selinux

permissive , enforcing , disabled :


disabled ) (enforcing , permissive
kernel
permissive enforcing
services services
boot .
permissive enforcing
setenforce

Page 87

By: Ahmed Gamil

RedHatLinuxSystemAdministration

0 permissive 1 enforcing

Page 88

By: Ahmed Gamil

RedHatLinuxSystemAdministration
If there is a problm in booting from Runlevel 5 (X Window).
1. Check tmp is full or not
df h /tmp -- /tmp is full remove the unnecessary file

2. Quota is already reached


Quota username -- if quota is already reached remove unnecessary file from
home directory.
3. Video card or resolution or monitor is misconfigured.
Boot the System in runlevel 3 --you can pass the Kernel Argument from boot
loader.
4. xfs service is running or not.
Use command: system-config-display -- It will display a dialog to configure
the monitor, Video card, resolution etc.

By: Ahmed Gamil

Page 89

RedHatLinuxSystemAdministration
5. Set the Default Runlevel 5 in /etc/inittab
id:5:initdefault:

6. Reboot the System you will get the GUI login Screen.

By: Ahmed Gamil

Page 90

You might also like