Networking Forums

Networking Forums > Computer Networking > Linux Networking > User control of server

Reply
Thread Tools Display Modes

User control of server

 
 
Mark Atherton
Guest
Posts: n/a

 
      06-27-2007, 09:44 AM
I have an old PC which acts as a server - fileserver, filtering web
proxy, mail server. The only users are family.

For years I've run it 24/7, only turning it off when I go on holiday,
but I've decided in future to run it only when it is needed (1).

While my wife and kids are well up to logging in over SSH and turning it
off from the command line, I'd like to have a point-and-click, or even
automated, solution. I've considered various possible ways of achieving
this, involving either:

(A) scripts on the clients run at startup or shutdown, or from a
..desktop file, which SSH (using RSA authentication) to the server. The
scripts could either run a command on the server or create a file as a
flag which is then checked by a cron job.

or

(B) continuous monitoring of clients by the server (using nmap or ping)
- see (2) for a quick kludged script.

but before I implement the above is there anything like this already
available? Desirable features would include support for Windows XP - not
essential - and an easy method of override for when I'm downloading
something big directly on the server overnight.

Mark Atherton


================================================== ====================

(1) Partly because I've stopped running a publicly accessible web server
on it, and partly because these "old PC"s are getting more powerful, and
power hungry. I used to use a 166MHz Pentium, downclocked to 75 MHz.
That ran *really* cool! That died eventually, so now I've got a 666MHz
PIII, which must consume many times as much power.


(2)

#!/bin/bash
#
# autoshutdown.sh
#
NETWORK=192.168.0
HOSTLIST=$(seq 10 20)
FLAGFILE=$(mktemp)
touch $FLAGFILE
while sleep 30
do
if [ -f /tmp/noautoshutdown
then
touch $FLAGFILE
else
for n in $HOSTLIST
do
ping -W 2 -c 1 -q $NETWORK.$n > /dev/null && \
touch $FLAGFILE
done
AGE=$(expr $(date +%s) - $(date +%s -r delete/) | dc)
if [ "AGE" -ge "600" ]
then
# More than 10 minutes since a ping reply received
rm $FLAGFILE
shutdown -h
fi
fi
done
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
user cant control his share Cnews Windows Networking 0 06-15-2008 06:09 PM
User Level Access Control -- Win 98 & XP David R. Warner, Jr. Windows Networking 0 10-31-2003 10:32 PM
User Level Access Control -- Win 98 & XP David R. Warner, Jr. Windows Networking 0 10-31-2003 05:11 AM
User Level Access Control -- Win 98 & XP David R. Warner, Jr. Windows Networking 0 10-31-2003 05:03 AM
User Level Access Control KEN Windows Networking 2 09-15-2003 07:01 PM



1 2 3 4 5 6 7 8 9 10 11