<commit_before><?php include('header.php'); ?>

<?php

   $username=$_GET["username"];

   $cmd = "sudo /usr/bin/wbinfo --name-to-sid  " . $username;
   exec( $cmd ,$log);


   $sid = explode(" ", $log[0])[0];
//   print $sid;
   
   $cmd = "sudo /usr/bin/wbinfo --sid-to-uid  " . $sid;
   exec( $cmd ,$log);

   $uid = $log[1];
 //  print $uid;


   print('<b>USERNAME: </b>' . $username);
   print('<br />');
   print('<b>SID: </b>' . $sid);
   print('<br />');
   print('<b>UID: </b>' . $uid);
  
   $cmd = "sudo /usr/bin/smbstatus -u " . $username;

   $log='';<commit_msg>Aggiunte info gruppi<commit_after><?php include('header.php'); ?>

<?php

   $username=$_GET["username"];

   $cmd = "sudo /usr/bin/wbinfo --name-to-sid  " . $username;
   exec( $cmd ,$log);


   $sid = explode(" ", $log[0])[0];
//   print $sid;
   
   $cmd = "sudo /usr/bin/wbinfo --sid-to-uid  " . $sid;
   exec( $cmd ,$log);

   $uid = $log[1];
 //  print $uid;

   $log='';
   $cmd = "sudo /usr/bin/wbinfo --user-groups  " . $username;
   exec( $cmd ,$log);
  
   $gids = $log;
   
   print('<b>USERNAME: </b>' . $username);
   print('<br />');
   print('<b>SID: </b>' . $sid);
   print('<br />');
   print('<b>UID: </b>' . $uid);
   print('<br />');
   
   print('<b>GROUPS: </b>' );
   foreach ($gids as &$gid) {

    $log = '';
    $cmd = "sudo /usr/bin/wbinfo  --gid-info " . $gid;
    exec( $cmd ,$log);
    $group_name =  explode(":", $log[0])[0];
    print ($gid . ' [' . $group_name . ']');
    print(', ');
    }
  
   $cmd = "sudo /usr/bin/smbstatus -u " . $username;

   $log='';
{'fraction_non_alphanumeric': 0.27625716104392106, 'fraction_numerical': 0.005092297899427116, 'mean_word_length': 2.3733905579399144, 'pattern_counts': {'":': 1, '<': 26, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1605495', 'n_tokens_mistral': 678, 'n_tokens_neox': 651, 'n_words': 127}