Ernest
11/03/2004, 11h27
Mmm ..., sauf erreur de ma part, ton utilisateur pourra se connecter en shell sur ta machine si tu n'ajoute pas cette option, que le script soit en php ou pas
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
User_Alias DOMAIN=creation
# Cmnd alias specification
Cmnd_Alias NET=/usr/sbin/adduser,/bin/chmod,/bin/mkdir,/bin/chown,/home/vpopmail/bin/vadduser,/usr/local/apache/conf/vhosts.conf
# Defaults specification
# User privilege specification
root ALL=(ALL) ALL
DOMAIN ALL=(ALL) NOPASSWD: NET
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
system("sudo /usr/sbin/adduser monuser -p password -g users");
?>