Hmm, non è sicuro se questo sarà di aiuto o meno. In sostanza, sì, è possibile 'richiesta' il nome utente e la password e confrontare con ciò che è presente sul sistema. Potete quindi modificare i file di proprietà di root? Probabilmente. Più difficile che mi vogliono pensare.
A meno che non si stanno facendo questo per il proprio interesse (o la vostra azienda non consente 3a parte del software) uno potrebbe suggerire alcuni software:
CFengine
Se questo non è ciò che stai cercando, quindi forse
Webmin
Sono sicuro che gli altri avranno altri software che utilizzano e preferiscono. Ho visto due di questi, ma non li uso.
Il seguente può prendere l'immissione di una password e un controllo nei confronti di informazioni che nel file shadow la userid inviando nel primo parametro e la password nel secondo.
Codice:
#!/usr/bin/perl
#
# Grab the user's old password from /etc/shadow and compare to sent
# old password from web page - send back error if not the same
#
# HOG 04/25/02 Another wonderful product from the warped mind of me
# ====================================================================
# Set up variables ------------
$user = "$ARGV[0]";
$oldpass = "$ARGV[1]";
$datenow = "`date '+%h %d %T'`";
#
$userinfo = `/usr/bin/grep $user /etc/shadow`;
($user1, $passwd1, $passextra) = split(/:/, $userinfo, 3);
$salt = substr($passwd1,0,2);
#
# Put testing junk here (print variables)
#
if (crypt($oldpass, $salt) ne $passwd1) {
# =========== FAILED - write to messages file - return error =========
system("/usr/bin/echo \"$datenow progserver chgpwd: ERROR changing $user
password on check\" >> /var/adm/messages");
die "";
}