Пример #1
0
function save()
{
    $sid = "S-1-5-21-" . $_GET["SID_SUFFIX"];
    $tpl = new templates();
    $smb = new samba();
    $smb->ChangeSID($sid);
    if (posix_getuid() != 0) {
        echo $tpl->_ENGINE_parse_body("{CHANGE_SID_TEXT}:{$sid} {success}<br>\n", "samba.index.php");
    }
}
<?php

if (posix_getuid() != 0) {
    die("Cannot be used in web server mode\n\n");
}
include_once dirname(__FILE__) . '/ressources/class.templates.inc';
include_once dirname(__FILE__) . '/ressources/class.ini.inc';
include_once dirname(__FILE__) . '/ressources/class.samba.inc';
include_once dirname(__FILE__) . '/samba.sid.php';
system('/usr/share/artica-postfix/bin/artica-install --samba-reconfigure');
$ldap = new clladp();
$samba = new samba();
$sid = $ldap->LOCAL_SID();
$samba->ChangeSID($sid);
SMBCHANGECOMPUTERS();
SMBGROUPS();
SMBCHANGEUSERS();
SMBRESTART();
die;