Hi,
this post describes the command line to get a list of all subnets for an Active Directory Site. The ds* commands are part of the Active Directory tools on Server and of RSAT Tools on Windows 7-10.
Continue reading Active Directory: Command line to get all subnets for a site →
Hi,
this post describes howto to track changes to a folder with some (text) files in it.
Continue reading Linux: Track changes of a folder by git and cron →
Hi,
let us assume you want to protect a whole directory by password and but one file must be readable for public access. This can easily be done by a .htaccess file.
For example: Who want to trotect the folder /var/www/html and only the file public.html should be readable without a password.
Continue reading Apache: Protect a folder by a password, but one file is for public access →
Hi,
just a short post :-). A powershell script to get the NetBIOS Name of an Active Directory Domain
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | [reflection.assembly] ::LoadWithPartialName( "System.DirectoryServices.Protocols" ) |Out -Null
if ( $args .count -ne 1){
Write-Warning " Start script with fqdn as parameter"
Write-Warning ( " for example: " + $myInvocation .myCommand.name+ " yourdomain.com" )
exit 1
}
$sDomainName = $args [0]
$oRootDSE = [ADSI] "LDAP://RootDSE"
$sConfig = $oRootDSE .Get( "configurationNamingContext" )
$oADSearchRoot = New-object System.DirectoryServices.DirectoryEntry( "LDAP://CN=Partitions," + $sConfig )
$sSearchString = "(&(objectclass=Crossref)(dnsRoot=" + $sDomainName + ")(netBIOSName=*))"
$oSearch = New-Object directoryservices.DirectorySearcher( $oADSearchRoot , $sSearchString )
$sNetBIOSName =( $oSearch .FindOne()).Properties[ "netbiosname" ]
Write-Host "Domain NetBIOS Name:" $sNetBIOSName
|
Have fun :-)!
Michael
Hi,
I have added a virtual directory to an apache web server and the virtual directory is located outside the document root. I configured the httpd.conf how it is decripted in the apache doc
When I access the virtual directory an error “Access forbidden! Error 403” occured. The config seems to ok:
1 2 3 4 5 6 7 | Alias /virtualdirectory/ "D:/user/www/virtual/"
<Directory "D:/user/www/virtual/">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
|
Solution:
The default apache configration is very restrictive. It do not allow to access directories without authentication. This is defined in the Directory section of httpd.conf:
1 2 3 4 | <Directory>
AllowOverride none
Require all denied
</Directory>
|
Add a “require all granted” directive to your virtual directory section will grant the access.
1 2 3 4 5 6 7 8 | Alias /virtualdirectory/ "D:/user/www/virtual/"
<Directory "D:/user/www/virtual/">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
|
My Knowledgebase for things about Linux, Windows, VMware, Electronic and so on…