hi friends, hope you are doing well...
Guys I wanna tell you that I have a bash script exercise that I need it to be configured for me to pass my scripting class, but the problem is our teacher is bad as shit and he does nothing more than chucking the sheets on us, and whenever you wanna ask him something he goes like "well you are supposed to figure it out yourself" the issue is we are all lost students, and I am trying my best and I bought all the
CBT Nuggets scripting videos, but I cant get nothing for now.. and my exercises should be handed over ssh Putty login to Centos server this week, so guys please help me to just pass my subject, and I will defiantly work on CBT Nuggets Videos to learn more and more, I even still needs to do my work, I work security, but human one not a software lol.. the question is:
you need to be able to develop an algorithmic statement of a solution for the following process's.
{{{{{{{{ A compnay called Buckaroo Banzi has contacted you and wants you to create a script to automate network management processes.
you are to create a script that will run from the command line as well as interactively (i.e. a script that runs with a menu or runs with the command line with parameters, both options are to work either the menu runs or if parameters the command line runs.) to do the following:
PART 1\ Make copy of network files ( create a function that copies the files) to /home/backup.
the script is to make a copy of the following files to a directory called /home/backup: (Note you will have to create the directory if it does not exist use mkdir)
List of files to copy:
/etc/hosts
[ Contains a list of known hosts in the local network. can be used if the IP of the system is not dynamically generated. For sample host name resolution to dotted notation, /etc/hosts.conf normally tells the resolver to look here before asking the network nameserver, DNS or NIS ]
/etc/hosts.allow
[ Man page same as hosts_access. Read by tcpd at least. ]
/etc/hosts.deny
[ Man page same as hosts_access. Read by tcpd at least. ]
/etc/
fstab
[ lists the file system currently "mountable" by the computer. This is important because when the computer boots, it runs the command
mount -a, which takes care of mounting every file system marked with a "1" in the next-to-last column of fstab. ]
/etc/group
[ Contains the valid group names and the users included in the specified groups. A single user can present in more than one group if he performs multiple tasks. For example, is a "User" is the administrator as well as a memebr of the project group "project 1", then his entry in the group file will look like: user: * :group-id : project1 ]
etc/passwd
[ See "man passwd". Holds some user account info including passwords (when not "shadowed"). ]
/etc/sysconfig/network-scripts/if*
[ Red Hat network configration scripts. ]
When the files are copied they are to be compressed using gzip to the file called "compfiles".
=====================================================
PART 2\
you are to check the messages log in /var/log/messages for problems in DNS (these messages are found by using "grep named /var/log/messages" where named is the dns daemon.) cut out the entry's then append them to a file called "problog" in a file that is in the directory ~/backup This can be done using cut and grep.
============================================
Option Work Part 3\
Using the script monitorzz convert the script into a function in the above script and give a menu option that allows the user to interactivlly test the dns is working ok.
==========================
Option Work Part 4\
Use the curl daemon to monitor a configured web site
www.evo.com.au to determine if the web page is up and running.
=========================================
Option Work Part 5\
Use of the snmp daemon to get goodput for the NIC. The statistics are to be graphed interactively. }}}}}}}}
Please guy please help me pass the subject, and I will donate if you guys like no problem at all..
heaps heaps heaps of thanx brothers.. you are always the smarter and the best..
Regards