Procedural File: account.inc
Source Location: /lib/account.inc
Classes:
samba3domain
Represents a Samba 3 domain entry
Page Details:
This provides several helper function for the account modules.
Tags:
Includes:
array_delete [line 71]
array array_delete(
array $values, array $array)
|
|
This function will return all values from $array without values of $values.
Tags:
Parameters
array |
$values |
list of values which should be removed |
array |
$array |
list of original values |
cmp_domain [line 421]
integer cmp_domain(
string $a, string $b)
|
|
Helper function to sort the domains
Tags:
Parameters
string |
$a |
first argument to compare |
string |
$b |
second argument to compare |
genpasswd [line 104]
This function will return a password with max. 8 characters.
Tags:
getdays [line 165]
This function will return the days from 1.1.1970 until now.
Tags:
getshells [line 42]
Returns a list of shells listed in config/shells.
Tags:
get_preg [line 464]
boolean get_preg(
string $argument, string $regexp)
|
|
Checks if a given value matches the selected regular expression.
Tags:
Parameters
string |
$argument |
value to check |
string |
$regexp |
pattern name |
in_array_ignore_case [line 87]
void in_array_ignore_case(
mixed $needle, mixed $haystack)
|
|
Checks if a string exists in an array, ignoring case.
lmPassword [line 200]
string lmPassword(
string $password)
|
|
Generates the LM hash of a password.
Tags:
Parameters
string |
$password |
password original password |
ntPassword [line 211]
string ntPassword(
string $password)
|
|
Generates the NT hash of a password.
Tags:
Parameters
string |
$password |
password original password |
pwd_disable [line 345]
string pwd_disable(
string $hash)
|
|
Marks an password hash as disabled and returns the new hash string
Tags:
Parameters
string |
$hash |
hash value to disable |
pwd_enable [line 320]
string pwd_enable(
string $hash)
|
|
Marks an password hash as enabled and returns the new hash string
Tags:
Parameters
string |
$hash |
hash value to enable |
pwd_hash [line 228]
string pwd_hash(
string $password, [boolean $enabled = true], [string $hashType = 'SSHA'])
|
|
Returns the hash value of a plain text password the hash algorithm depends on the configuration file
Tags:
Parameters
string |
$password |
the password string |
boolean |
$enabled |
marks the hash as enabled/disabled (e.g. by prefixing "!") |
string |
$hashType |
password hash type (CRYPT, SHA, SSHA, MD5, SMD5, PLAIN) |
pwd_is_enabled [line 370]
boolean pwd_is_enabled(
string $hash)
|
|
Checks if a password hash is enabled/disabled
Tags:
Parameters
string |
$hash |
password hash to check |
RndInt [line 142]
integer RndInt(
string $Format)
|
|
THIS FUNCTION GENERATES A RANDOM NUMBER THAT WILL BE USED TO RANDOMLY SELECT CHARACTERS.
Tags:
Parameters
string |
$Format |
"letter" or "number" |
search_domains [line 387]
Returns an array with all Samba 3 domain entries under the given suffix
Tags:
smbflag [line 177]
string smbflag(
array $input)
|
|
Takes a list of Samba flags and creates the corresponding flag string.
Tags:
Parameters
array |
$input |
is an array of Samba flags (e.g. X or D) |
|