Hello, Fedudes!
So this is the situation:
I have a server called "El Servidor de la Comunidad" or "The Community Server".
This servers provides old fashioned hosting to GNU & Linux and Fedora enthusiasts.
Everybody has a shell and their websites are all in /srv/www; owned by them and their group; allowing the world to enter.
Basically, everything has 2771 from /srv/www and up; until it reaches the actual document root; where people have what they please.
So, since we're not an ISP; just a bunch o' loosers, we do not have an idea of when a user needs to renew the yearly subscription, which is $100.
Anyway, I thought of using usermod -e; which is the expire flag. But this will not disable their websites along with the user, since the files are out of their home dir; which we will never support.
So, I need good ideas on how to make their websites go away with a "this guy doesn't pay... " message.
This is to avoid the possibility of somebody not paying for the service; which covers the bills for the server.
So, if anybody has a great idea, this is the time to spit it out.
Thanks guys; in advance.
p.s. Please, do not pollute this email with rants about how 2771 doesn't provide actual security or why should we put stuff at /home; which we will not do. Focus on clean, simple, ingenious solutions, if you may.
Allegedly, on or about 02 May 2014, Renich Bon Ciric sent:
since we're not an ISP; just a bunch o' loosers, we do not have an idea of when a user needs to renew the yearly subscription, which is $100.
Sounds like you need some kind of diary program. When someone pays their dues, you record how much and when, and then set two future events to happen. An expiry date that disables their website, and an invoice date for at least a couple of weeks before the expiry.
If you really are only a small group, you mightn't even need to automate it, just use an ordinary non-computer desk diary. But there are various calendar programs about, and you can set what happens on those dates, including running programs rather than just popping up messages or playing alarm noises. I dare say you could find one that would let you run a script on a date that could do the emailing and account disabling.
i.e. Have a look at what "diary" or "calendar" programs you can easily install, and see if any fit your needs.
On Fri, May 02, 2014 at 05:38:03AM -0500, Renich Bon Ciric wrote:
Anyway, I thought of using usermod -e; which is the expire flag. But this will not disable their websites along with the user, since the files are out of their home dir; which we will never support.
There are a lot of possibilities, but here is one way. Use that flag suggested, and also run a nightly cron job which looks at the "account experiation date" field in /etc/shadow (it's the next-to-last one -- see `man 5 shadow`). This is in days since Jan 1, 1970. Compare that to the _current_ days since that time `echo $(($(date +%s) / 86400))` and if the number is higher, drop in the webserver configuration which redirects to the expired notice.
On Fri, May 2, 2014 at 12:49 PM, Matthew Miller mattdm@fedoraproject.org wrote:
There are a lot of possibilities, but here is one way. Use that flag suggested, and also run a nightly cron job which looks at the "account experiation date" field in /etc/shadow (it's the next-to-last one -- see `man 5 shadow`). This is in days since Jan 1, 1970. Compare that to the _current_ days since that time `echo $(($(date +%s) / 86400))` and if the number is higher, drop in the webserver configuration which redirects to the expired notice.
Excelent advice! Thanks a lot!
I will come up with something and post it to see if it is of interest to anyone that minds FHS.