CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
Perl system administration problem


New User

Jan 31, 2009, 5:03 AM

Post #1 of 5 (3203 views)
Perl system administration problem Can't Post

I am new to perl and i got an assignment question that to perform the following. I have no clue to start so I am just wondering if there's any expert here can help me with it. I know that you guys probably wouldn't border to write up the actual program so any reference reading on each question would be much appreciate!!
Thanks guys,

In systems that offer many services/task to help users such as web server and disk quota system. Your task is to develop a system administration tool (called using perl program that will allow administrator to;

Question 1
Grant 60 MB of the hard drive space from server for each new user and to
modify if the existing user has no quota granted.

Question 2
Force temporary users on the system to expire in 90 days from the creation

Question 3
Generate the system quota report on the last day of every month and send
this report to

Question 4
Add new web access account so that the user can upload web files into (1
mark) /home/username/www and these web files could display from


Feb 19, 2009, 5:30 AM

Post #2 of 5 (3130 views)
Re: [tmac17] Perl system administration problem [In reply to] Can't Post


Question 1: I am learning English and I don't understand what you want.

Question 2: If you know all the temporary users you can change the Expire field in the /etc/shadow line of every user. The Expire field displays the number of days since January 1, 1970.

Question 3: Do you have the Mail::Mailer module? If yes, the following code can be useful.

#!/usr/bin/perl -w 

use Mail::Mailer;

$type = 'mail';
$mailprog = Mail::Mailer->new($type);

%headers = (
'To' => '',
'From' => '',
'Subject'=> 'Reports'

print $mailprog `quotaon -av`;

Be careful that I didn't test this code.

Question 4: To do that you have to edit your httpd.conf. Uncomment "UserDir public_html" and comment "UserDir disable". Create the public_html directories and set the permissions as described in the httpd.conf.


Veteran / Moderator

Feb 19, 2009, 6:35 AM

Post #3 of 5 (3126 views)
Re: [gnix] Perl system administration problem [In reply to] Can't Post


It's great that you're here helping others, but please don't provide complete answers to someones homework assignment. When dealing with homework questions, it's better to give guidance and point to resources, but not to give solutions.

Question 1: deals with setting disk quotas
man quota
man setquota

Question 2:
man usermod

Question 3:
See answer to question 1


Feb 19, 2009, 6:40 AM

Post #4 of 5 (3124 views)
Re: [FishMonger] Perl system administration problem [In reply to] Can't Post

Sorry, I didn't understand that was an homework. The next time I will read more carefully.


New User

Feb 19, 2009, 2:33 PM

Post #5 of 5 (3113 views)
Re: [gnix] Perl system administration problem [In reply to] Can't Post

THANKS A LOT ginx and fishmonger
Really appreciate that


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives