August 3rd, 2010
So you inherit a box running linux and you have no idea which flavor of linux it is. How do you find out?
If all you need the kernel version you can try
uname -a
This outputs something like this
Linux localhost.localdomain 2.4.20-31.9 #1 Tue Apr 13 18:04:23 EDT 2004 i686 i686 i386 GNU/Linux
If you need the actual distro name you can try
cat /etc/*release
In Ubuntu it shows up as
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION=”Ubuntu 9.04″
Or even
cat /etc/issue
which spits out the following on Ubuntu
Ubuntu 9.04 \n \l
You can combine all three to get the following
uname -a && cat /etc/*release && cat /etc/issue
Posted in *nix, howto | No Comments »
April 27th, 2010
Active Directory doesn’t let you edit the Dial-up of VPN access policies for multiple users at once through the GUI. You have to edit this setting one at a time for each user. This can be painstaking if you a lot of users. Luckily there is a VB script available like for almost everything else in AD.
Dim aConnection, aCommand, aResult, strLDAPPath, user, objUser
Const ADS_PROPERTY_CLEAR = 1
strLDAPPath = InputBox("Please enter the LDAP path of the OU:")
WScript.Echo strLDAPPath
Set aConnection = CreateObject("ADODB.Connection")
Set aCommand = CreateObject("ADODB.Command")
aConnection.Provider = "ADsDSOObject"
aConnection.Open
aCommand.ActiveConnection = aConnection
aCommand.CommandText=";(&(objectCategory=Person)(objectClass=User));distinguishedName;subTree"
Set aResult = aCommand.Execute()
Do While Not aResult.EOF
strDN = aResult.Fields("distinguishedName")
WScript.Echo strDN
Set objUser = GetObject("LDAP://" & strDN)
' Comment the following line to manage connection through Remote Access Policy
objUser.Put "msNPAllowDialin", FALSE
' Uncomment the following line to manage connection through Remote Access Policy
' objUser.PutEx ADS_PROPERTY_CLEAR, "msNPAllowDialin", 0
objUser.SetInfo
aResult.MoveNext
Loop
This script will update the access settings for a group of users in a particular OU. Once you run the script, a dialog box will ask you for this OU. Once this is set all users in that OU will be updated.
The AD property this script modifies is ‘msNPAllowDialin’. This property is accepts boolean values. So the three options are
TRUE (to allow access)
FALSE (to deny access)
To manage access via the Remote Access Policy, comment out the
objUser.Put "msNPAllowDialin", FALSE
and uncomment the
' objUser.PutEx ADS_PROPERTY_CLEAR, "msNPAllowDialin", 0
line.
Posted in howto, windows | No Comments »
August 27th, 2009
SNMP is not installed by default on Open Solaris but really easy to set up. You don’t need to compile it from source as some would suggest.
All you’ll need is to install the SUNWsmmgr package.
pkg install SUNWsmmgr
All of the config files, including snmpd.conf are in /etc/sma/snmp.
The service to enable snmp is called sma.
svcadm enable svc:/application/management/sma:default
To install utilities like snmpwalk and snmpget, you can install the SUNWsmcmd package.
Posted in *nix, howto | No Comments »
July 27th, 2009
In order to install Virtual Box Additions on your newly install Ubuntu virtual machine, you will need to fulfill the following dependencies.
Install dkms and the GNU C Compiler using the following command:
sudo apt-get install dkms gcc
Install the build and header files for Ubuntu using the following command:
sudo apt-get install linux-headers-$(uname -r)
$(uname -r) in the above command just passes your kernel version to apt-get
Posted in *nix, howto | No Comments »
July 15th, 2009
The officially supported method of detecting the presence of the .NET Framework 2.0 is to check the following registry key/value:
[HKEY_LOCAL_MACHINE\Software\Microsoft\Net Framework Setup\NDP\v2.0.50727]
Install = 1 (REG_DWORD)
Posted in howto, windows | No Comments »