473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Chage script for Linux servers?

Hey folks,

I'm looking for a script that allows control of account expiration dates
using chage under Linux so non admins can control account expiration of
client accounts. Anyone ever written anything like that?
Dec 19 '06 #1
6 1606
Ivan Marsh wrote:
Hey folks,

I'm looking for a script that allows control of account expiration dates
using chage under Linux so non admins can control account expiration of
client accounts. Anyone ever written anything like that?
This is definitely not something you're capable of accomplishing simply
by using PHP. The PHP engine is running on the Linux box, so it's
limited by the security configuration of that server. Including the
security settings that keep non-admin users from modifying settings
only accessible by administrators. Sorry, man.

Dec 20 '06 #2
On Tue, 19 Dec 2006 22:19:11 -0800, pangea33 wrote:
Ivan Marsh wrote:
>Hey folks,

I'm looking for a script that allows control of account expiration
dates using chage under Linux so non admins can control account
expiration of client accounts. Anyone ever written anything like that?

This is definitely not something you're capable of accomplishing simply
by using PHP. The PHP engine is running on the Linux box, so it's
limited by the security configuration of that server. Including the
security settings that keep non-admin users from modifying settings only
accessible by administrators. Sorry, man.
Are you suggesting it's not possible to shell out and run a sudo command
from a PHP script?

I have complete control over the server in question.
Dec 20 '06 #3
Ivan Marsh wrote:
On Tue, 19 Dec 2006 22:19:11 -0800, pangea33 wrote:

>>Ivan Marsh wrote:
>>>Hey folks,

I'm looking for a script that allows control of account expiration
dates using chage under Linux so non admins can control account
expiration of client accounts. Anyone ever written anything like that?

This is definitely not something you're capable of accomplishing simply
by using PHP. The PHP engine is running on the Linux box, so it's
limited by the security configuration of that server. Including the
security settings that keep non-admin users from modifying settings only
accessible by administrators. Sorry, man.


Are you suggesting it's not possible to shell out and run a sudo command
from a PHP script?

I have complete control over the server in question.
You can, but you're creating a security whole in your server the size of
the Grand Canyon.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Dec 20 '06 #4
On Wed, 20 Dec 2006 11:33:14 -0500, Jerry Stuckle wrote:
Ivan Marsh wrote:
>On Tue, 19 Dec 2006 22:19:11 -0800, pangea33 wrote:

>>>Ivan Marsh wrote:

Hey folks,

I'm looking for a script that allows control of account expiration
dates using chage under Linux so non admins can control account
expiration of client accounts. Anyone ever written anything like that?

This is definitely not something you're capable of accomplishing simply
by using PHP. The PHP engine is running on the Linux box, so it's
limited by the security configuration of that server. Including the
security settings that keep non-admin users from modifying settings only
accessible by administrators. Sorry, man.


Are you suggesting it's not possible to shell out and run a sudo command
from a PHP script?

I have complete control over the server in question.

You can, but you're creating a security whole in your server the size of
the Grand Canyon.
Of that I have no doubt... but this isn't a public server so I only have
to worry about "internal" issues.

Dec 20 '06 #5
Ivan Marsh wrote:
On Wed, 20 Dec 2006 11:33:14 -0500, Jerry Stuckle wrote:
Ivan Marsh wrote:
On Tue, 19 Dec 2006 22:19:11 -0800, pangea33 wrote:
Ivan Marsh wrote:

Hey folks,

I'm looking for a script that allows control of account expiration
dates using chage under Linux so non admins can control account
expiration of client accounts. Anyone ever written anything like that?

This is definitely not something you're capable of accomplishing simply
by using PHP. The PHP engine is running on the Linux box, so it's
limited by the security configuration of that server. Including the
security settings that keep non-admin users from modifying settings only
accessible by administrators. Sorry, man.
Are you suggesting it's not possible to shell out and run a sudo command
from a PHP script?

I have complete control over the server in question.
You can, but you're creating a security whole in your server the size of
the Grand Canyon.

Of that I have no doubt... but this isn't a public server so I only have
to worry about "internal" issues.
My response about an inability to do this was due to it being in a php
forum. If you've got full control over this server, why are you using
php? If it's because you're developing an Intranet, you can indeed use
sudo in the script, but will have to either use NOPASSWD or store the
unencrypted admin password in a text document that the webserver user
account can access and read.

Any thoughts about firing off a shell script cron task as root on the
server instead of allowing indiscriminate execution by users?

Dec 22 '06 #6
On Fri, 22 Dec 2006 14:03:35 -0800, pangea33 wrote:
Ivan Marsh wrote:
>On Wed, 20 Dec 2006 11:33:14 -0500, Jerry Stuckle wrote:
Ivan Marsh wrote:
On Tue, 19 Dec 2006 22:19:11 -0800, pangea33 wrote:
Ivan Marsh wrote:

Hey folks,

I'm looking for a script that allows control of account expiration
dates using chage under Linux so non admins can control account
expiration of client accounts. Anyone ever written anything like that?

This is definitely not something you're capable of accomplishing simply
by using PHP. The PHP engine is running on the Linux box, so it's
limited by the security configuration of that server. Including the
security settings that keep non-admin users from modifying settings only
accessible by administrators. Sorry, man.
Are you suggesting it's not possible to shell out and run a sudo command
from a PHP script?

I have complete control over the server in question.

You can, but you're creating a security whole in your server the size of
the Grand Canyon.

Of that I have no doubt... but this isn't a public server so I only have
to worry about "internal" issues.

My response about an inability to do this was due to it being in a php
forum. If you've got full control over this server, why are you using
php? If it's because you're developing an Intranet, you can indeed use
sudo in the script, but will have to either use NOPASSWD or store the
unencrypted admin password in a text document that the webserver user
account can access and read.

Any thoughts about firing off a shell script cron task as root on the
server instead of allowing indiscriminate execution by users?
"Indiscriminate execution by users" is, unfortunately the access I've been
asked to provide.

What the script will ultimately be doing is giving a select group of
internal users the ability to check and reset the password expiration
dates of a white-list of external client users.
Dec 26 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tom Jones | last post by:
I need to access databases on both win2k and Linux systems but I have to set up the DSNs under program control ... no uses using GUIs ... Has anyone done this? if so can we discuss it either in...
2
by: Jonathan M. Rose | last post by:
I am looking for a script that I can sit on an HTML server (Linux, Apache, PHP/Perl/Python/Etc.) that will allow me to do the following things: 1) Post news articles that consists of (i) a title...
6
by: Paul Winkler | last post by:
This is driving me up the wall... any help would be MUCH appreciated. I have a module that I've whittled down into a 65-line script in an attempt to isolate the cause of the problem. (Real...
6
by: gnu | last post by:
Rationale to use Linux ======================= - I can't afford paying for $199 for the license of an OS that's arguably better thank Linux for each of 10 computers I have. - I want to be...
383
by: John Bailo | last post by:
The war of the OSes was won a long time ago. Unix has always been, and will continue to be, the Server OS in the form of Linux. Microsoft struggled mightily to win that battle -- creating a...
9
by: Freebird | last post by:
Hello everyone ... I've a problem in here, I need to make a 70 000 rows insert, and it's taking a lot more than 30 seconds, my problem is that it will be a script that will work in many...
3
by: vj | last post by:
I'm building a large infrastructure with about 30 servers (all running linux). I allow my end users to write scripts which then get broken down in smaller parts and run across the 30 servers. The...
9
by: 8anos | last post by:
Hello, I am new at the community and newbie at programming :) As you may know rapidshare provides a perl script for linux, to upload files at their servers. You can find the original scripts at...
2
vvsvinu
by: vvsvinu | last post by:
Iam a sys admin in a firm and iam asked to give a configuration list of a server profile. As there are a lot of new servers now a days and also from the net i got some information still iam confused...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.