Linux System Administration LINUX SYSTEM ADMINISTRATION Linux System
- Slides: 23
Linux System Administration LINUX SYSTEM ADMINISTRATION
Linux System Administration SYS ADMIN TASKS 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.
Linux System Administration Init Runlevels 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)
Desktop Configuration Init Runlevels 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.
Linux System Administration Linux Services 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 POP 3 (Post Office Protocol) server gpm : Mouse httpd : Apache Web server
Linux System Administration Linux Services iptables : Kernel based Packet Filtering firewall kudzu: Finds new Hardware mysqld : My. SQL 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
Linux System Administration Linux Services 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
Linux System Administration Linux Services Start/Stop boot time services in /etc/rc. d/rc 3. d or /etc/rc. d/rc 5. 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. K 95 kudzu K 96 pcmcia S 56 xinetd S 60 vsftpd Use service <service name> start/stop/restart to start, stop or restart a service from command line
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
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
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
Group Management • Group info housed in /etc/group • • Similar to user management groupadd groupdel groupmod
Finding User Information • • finger <nama-user> id <nama-user> groups <namauser> cat /etc/passwd
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
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
• $ cat /etc/passwd root: x: 0: 0: root: /bin/bash daemon: x: 1: 1: daemon: /usr/sbin: /bin/sh bin: x: 2: 2: bin: /bin/sh sys: x: 3: 3: sys: /dev: /bin/sh sync: x: 4: 65534: sync: /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: 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
/etc/group File • This file has information regarding the various groups in the system, each line gives information about one group.
• # cat /etc/group root: x: 0: root bin: x: 1: root, bin, daemon: x: 2: root, bin, daemon sys: x: 3: root, bin, 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
Linux System Administration /etc/shadow File /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$QR 3 dr. Pr. Q$JLol. PKyi. Vu. Xvea 1 F 2 Ipb. Px 9 F 9 PEV 0 s/IGc. NCpm 6 Zr. BA 6 AFDvw. HPQG 7 Es. TQHu. Uqxf. C vlsu. KRb. O 7 w 5 RLPyj 8 n. S/: 15119: 0: 99999: 7: : :
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
- Suse linux administration
- Linux operation and administration chapter 8
- Linux operations and administration
- Postfix mysql
- Linux kernel linux security module m1
- Uclinux
- What is ramis
- System administration module
- Placement administration and support system
- Office ventilation
- Network operating system administration
- System administration outsourcing
- Ramis system
- Suny system administration
- Mitel 5000 hx
- Linux os design
- Definition of operating system
- Linux operating system presentation
- Linux operating system concepts
- Linux on z
- Core system services in linux
- Linux system v
- Os ticketing system
- Unix sort reverse