Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
36 views

Linux Admin Problem

The document outlines scripts for a system administrator to automate user account management, system monitoring, and backups. The scripts would: 1) Automatically create user accounts based on roll numbers and set default passwords. 2) Set disk quotas between 10-50MB for students. 3) Backup user home directories and system files daily at 12:00am. 4) Backup and delete user accounts for students who have left a program. 5) Monitor processes every 15 minutes and email the administrator if any fail. 6) Monitor log files for errors and display issue lines. 7) Create daily user login/logout reports between 8pm-9am from system logs.

Uploaded by

methukupally
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Linux Admin Problem

The document outlines scripts for a system administrator to automate user account management, system monitoring, and backups. The scripts would: 1) Automatically create user accounts based on roll numbers and set default passwords. 2) Set disk quotas between 10-50MB for students. 3) Backup user home directories and system files daily at 12:00am. 4) Backup and delete user accounts for students who have left a program. 5) Monitor processes every 15 minutes and email the administrator if any fail. 6) Monitor log files for errors and display issue lines. 7) Create daily user login/logout reports between 8pm-9am from system logs.

Uploaded by

methukupally
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

AIM:​ To implement the duties of a system administrator using shell scripting

Problem Statement:

1. Assume that you are a system administrator for a university where students regularly log into a
central server containing their home directory and do all their jobs on the server. Create the following
shell scripts for automating the management of users.

i.A script that creates accounts for all users according to their roll numbers and creates a default
password. Users need to change their password at the time of first logon.

ii.A script for setting the quota 10MB to 50 MB for each of the students.

iii.A script that takes the backup of all user home directories and system configuration files daily.
Name the backup files according to user accounts, system files and the date of backup. This
script should execute automatically using the crond daemon daily at 12:00am.

iv.A script to backup all user accounts for a given batch and delete the user accounts of the
students for that batch. Such a script could be useful for setting up the system for the next batch
after the current batch has left.

2. Create a script which monitors the processes running on a system time to time - say every 15 minutes.
If any running process is down it sends a mail immediately to the system administrator on a given email
address.

3. Create a script which monitors the log files in /var/log directory made by syslog and looks for words
such as "failed", "stopped", "started", "terminating", "logged", "exit","error" etc... and copies that line
from the log file and displays it on the console continuously.

4. Create a program which reads the utmp, wtmp entries of the system which contain the record of all
the users logging in to the system and logging out. From this file find out all the users which log into the
system between 8:00 p.m. and 9:00 a.m. Create a list of such users daily at 9:00 a.m. by running this
program through a crond job. Store this list in a file whose name is in the format userlist-DD-MM- YYYY
in a separate directory.

5. Create a script that displays a summary of the system state as follows: Uptime

OS USED :​ FEDORA or any linux-based OS

DESCRIPTION:

A System administrator, or sysadmin, is a person who is responsible for the upkeep, configuration, and
reliable operation of computer systems; especially multi-user computers, such as servers.

A computer operator performs routine maintenance and upkeep, such as changing backup tapes or
replacing failed drives in a redundant array of independent disks (RAID). Such tasks usually require
physical presence in the room with the computer, and while less skilled than sysadmin tasks, may
require a similar level of trust, since the operator has access to possibly sensitive data.

Our problem is designed to experience the duties of a system admin in his daily routine. This includes
constantly adding users to the system, maintaining their ids and keeping track of all their processes.
Alongwith this, the system stability is ensured by keeping a constant backup of all the user data. Also, if
any vital process is down then the admin is informed immediately using the mail system.

You might also like