Download presentation
Presentation is loading. Please wait.
1
LINUX SYSTEM ADMINISTRATION
2
SYS ADMIN TASKS Linux System Administration Setting the Run Level
System Services User Management Network Settings Scheduling Jobs Quota Management Backup and Restore Adding and Removing software/packages Setting a Printer Monitoring the system (general, logs) Monitoring any specific services running. Eg. DNS, DHCP, Web, NIS, NPT, Proxy etc.
3
Init Runlevels Linux System Administration
The following runlevels are defined in Linux: 0 - halt (Do NOT set initdefault to this) 1 - Single user mode 2 - Multiuser, without Network (The same as 3, if you do not have networking) 3 – Text Mode 4 - unused 5 – Graphical Mode 6 - reboot (Do NOT set initdefault to this)
4
Init Runlevels Desktop Configuration
The default runlevel for a system to boot to is configured in /etc/inittab. id:5:initdefault: In GUI: Applications System Settings Server Settings Services Generally, Linux operates in runlevel 3 or 5.
5
Linux Services Linux System Administration
There are 113 deamons, Out of them, the following are most widely used: apmd : Power Management autofs : Automount services crond : Periodic Command Scheduler cups : Common Unix Printing System dhcpd : The DHCP server dovecot : IMAP (Internet Message Access Protocol) and POP3 (Post Office Protocol) server gpm : Mouse httpd : Apache Web server
6
Linux Services Linux System Administration
iptables : Kernel based Packet Filtering firewall kudzu: Finds new Hardware mysqld : MySQL server named : BIND server network : Networking nfs : Network File Share nfslock : NFS file locking ntpd : NTP (Network Time Protocol) server portmap : RPC (Remote Procedure Call) support postgresql : The Postgresql Database Engine
7
Linux Services Linux System Administration
sendmail : Sendmail Mail Server smb : Samba Network Services snmpd : Simple Network Management Protocol squid : Squid Proxy Server sshd : Open SSH and SFTP server syslog : System Logging xinetd : Provides support for telnet, ftp, talk, tftp etc. ypbind : NIS Server
9
Linux Services Linux System Administration
Start/Stop boot time services in /etc/rc.d/rc3.d or /etc/rc.d/rc5.d All services startup scripts which start with S will start at boot time and all startup scripts which start with K will not start at boot time. The number after S or K is the priority. K95kudzu K96pcmcia S56xinetd S60vsftpd Use service <service name> start/stop/restart to start, stop or restart a service from command line
10
Creating a new User Account
Linux System Administration Creating a new User Account Add an entry in /etc/passwd and /etc/shadow file (use next uid and suitable gid). You will have to create the user directory and assign a password to the user Use useradd or adduser command to create a new user (useradd –g <group> -d <home directory> -c <comment> -s <shell> login-name) Use groupadd to create a new group (groupadd group-name). You will have to assign a password (passwd login-name) In GUI: Applications System Settings Users and Groups
12
Removing a User Account
Linux System Administration Removing a User Account Remove login id from /etc/passwd & /etc/shadow file and delete home directory userdel –r <username> Use GUI to Delete the user
13
Modifying Users Syntax: usermod [options] username
Options are pretty much identical to those of useradd Also, -l to change the user’s login name And –G to list additional groups to add user to
14
Group Management Group info housed in /etc/group
Similar to user management groupadd groupdel groupmod
15
Finding User Information
finger <nama-user> id <nama-user> groups <namauser> cat /etc/passwd
16
File for User Management
/etc/group Group account information. /etc/gshadow Secure group account information. /etc/login.defs Shadow password suite configuration. /etc/passwd User account information. /etc/shadow Secure user account information. BEIT Presentation
17
/etc/passwd File /etc/passwd Holds user account info
Linux System Administration /etc/passwd File /etc/passwd Holds user account info Login name User Id (uid) Group Id (gid) General Comment about the user Home Directory Shell
18
$ cat /etc/passwd root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/bin/sh man:x:6:12:man:/var/cache/man:/bin/sh lp:x:7:7:lp:/var/spool/lpd:/bin/sh mail:x:8:8:mail:/var/mail:/bin/sh news:x:9:9:news:/var/spool/news:/bin/sh uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh hplip:x:113:7:HPLIP system user,,,:/var/run/hplip:/bin/false gdm:x:114:120:Gnome Display Manager:/var/lib/gdm:/bin/false himanshu:x:1000:1001:Himanshu,,,:/home/himanshu:/bin/bash guest:x:1001:1003::/home/guest:/bin/sh
19
/etc/group File This file has information regarding the various groups in the system, each line gives information about one group.
20
# cat /etc/group root:x:0:root bin:x:1:root,bin,daemon daemon:x:2:root,bin,daemon sys:x:3:root,bin,adm adm:x:4:root,adm,daemon tty:x:5: disk:x:6:root lp:x:7:daemon,lp mem:x:8: kmem:x:9: mail:x:12:mail
21
/etc/shadow File Linux System Administration
/etc/shadow Contains the encrypted password information for users' accounts and optionally the password aging information. /etc/gshadow : Contains the encrypted password information for groups' accounts and optionally the password aging information. Contoh /etc/shadow: ddouthitt:$6$QR3drPrQ$JLolPKyiVuXvea1F2IpbPx9F9PEV0s/IGcNCpm6ZrBA6AFDvwHPQG7EsTQHuUqxfCvlsuKRb.O7w5RLPyj8nS/:15119:0:99999:7:::
23
chage $ chage -l ddouthitt Last password change : May 25, 2011
Password expires : never Password inactive : never Account expires : never Minimum number of days between password change : 0 Maximum number of days between password change : 99999 Number of days of warning before password expires : 7
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.