Author Archives: admin

Windows 8 and Microsoft VPN problems

Today i have the problem where a Windows 8 machine, won’t connect to Microsoft VPN server.

The problems was that MSChapV2 was disabled on the client.
Please find this under Security and Allowed these protocols.

The error message I got from both the VPN servers and the client was:

Server:
The following error occurred in the Point to Point Protocol module on port: VPN2-9, UserName: XXXXX\XX. The connection was prevented because of a policy configured on your RAS/VPN server. Specifically, the authentication method used by the server to verify your username and password may not match the authentication method configured in your connection profile. Please contact the Administrator of the RAS server and notify them of this error.

Client:
Error 815: The connection was prevented because of a policy configured on your RAS/VPN server. Specifically, the authentication method used by the server to verify your username and password may not match the authentication method configured in your connection profile. Please contact the Administrator of the RAS server and notify them of this error.

Please see more here: http://jermsmit.com/windows-8-vpn-error-812/

Uninstall all updates installed on a specific day

Get the list of the update

wmic qfe get hotfixid,installedon | findstr MM/DD/YYYY > c:\list.txt

 

  1. Open C:\list.txt in Notepad.
  2. Go to Edit > Replace and set the following field values:
    Find what: KB
    Replace with: Leave the line empty
  3. Go to Edit > Replace and set the following field values:
    Find what: MM/DD/YYYY
    Replace with: Leave the line empty
  4. Generate this uninstall script:

for /f %i in (‘type c:\list.txt’) do echo wusa /uninstall /kb:%i >> c:\uninstall.list

Open uninstal.list  run each line by itselft.

 

 

Error while Installing the Client Agent on Ubuntu and Debian Linux – unexpected operator

Errors like this:

/opt/CA/ABuagent/uagentsetup: 74: [: -e: unexpected operator
/opt/CA/ABcmagt/caagent: 60: cd: can’t cd to /nls
/opt/CA/ABcmagt/caagent: 60: cd: can’t cd to /nls
/opt/CA/ABcmagt/caagent: 60: cd: can’t cd to /nls
/opt/CA/ABcmagt/aglang_setup: 60: [: -e: unexpected operator
/opt/CA/ABcmagt/caagentsetup: 54: [: -e: unexpected operator

While installing CA Arcserve R16.5, can be resolve by changing /bin/sh linking from dash to bash.

You can check the linking of /bin/sh, with this commands:

ls –l /bin/sh

If you get:

lrwxrwxrwx 1 root root 4 Feb  7 19:41 /bin/sh -> dash

You have this problem.
Change the linking is easy, just reconfigure dash

dpkg-reconfigure dash

Select No, to Install dash as /bin/sh

Once this is changed you should be able to install the agent or start the agent fine.

 

 

 

 

CA ArcServe16.5 under Debian X64bit

  1. First install 32bit libs.
    apt-get install g++-multilib
  2. Then get the DEB’s files, from the cdrom
    mount /dev/cdrom /mnt
    cd /mnt/datamoverandagent/linux
    dpkg -i *.deb

    If you get errors like this: /opt/CA/ABcmagt/aglang_setup: 60: [: -e: unexpected operator.
    See here: http://kennethdalbjerg.dk/2014/04/07/error-while-installing-the-client-agent-on-ubuntu-and-debian-linux-unexpected-operator

  3. Run these commands
    /opt/CA/ABcmagt/caagentsetup
    /opt/CA/ABcmagt/caagent_autostrtstop
  4. Run this command to start R16.5 CA Agent.
    /etc/init.d/bab_agent start

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Exchange: Get a list of all email address

For en liste over alle mail adresse

Get-recipient -resultsize unlimited | select name -expand emailaddresses | select name,smtpaddress

For en liste over alle mail adresse på et given domæne

Get-Recipient | Where{$_.EmailAddresses -match "it-grp.dk"} | select name -expand emailaddresses | select name,smtpaddress | where {$_ -match "kennethdalbjerg.dk"}

Dual boot Ubuntu and Windows 7, with Safeboot / Mcafee Endpoint Encryption

First you need to install Windows 7, and safeboot / Mcafee endpoint protection.

Then you need to take a backup of the MBR, this is done with a Ubuntu live cd, run this commands:

dd if=/dev/sda of=/path/safeboot.mbr bs=512 count=1

 

Put it on a USB flash drive or something else, that you can access after the installation.

After you have make a backup of the MBR, just install Ubuntu the normally way, after you have make changes to grub2 config files.

cp /path/safeboot.mbr /boot/
nano /etc/grub.d/40_custom

At the buttom of this files you need to insert this:

menuentry "Windows 7" {
set root='hd0,msdos1'
chainloader (hd0,msdos5)/boot/safeboot.mbr
boot
}

Where set root=’hd0,msdos1′ is becuase my windows 7 root partition is locate on disk 0, and msdos partition 1, and chainloader (hd0,msdos5)/boot/safeboot.mbr is because my ubuntu partition is located on disk 0 and msdos partition 5.

Upgrade firmware on Dellservers running XenServer and get Dell Openmanage aswell

First you need to enable some standard Repos first

vi /etc/yum.repos.d/CentOS-Base.repo

Enable base and updates.

Then you need to enable Dell yum Repos

wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash

This will automatically create the repo files in /etc/yum.repos.d
Next we will install Dell OMSA (Openmanage) and the firmwall tools needing to upgrade firmware on a Dell Server.

yum install srvadmin-all firmware-tools

 

Then we have to start the Dell Openmanage software this can be done with

/opt/dell/srvadmin/sbin/srvadmin-services.sh start

And after this we can run

/opt/dell/srvadmin/sbin/srvadmin-services.sh status

To check that the Dell Openmanage is running okay.
Now you just need to enable port 1311TCP in the firewall of yours Xenserver

nano /etc/sysconfig/iptables

Now add the following line:

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1311 -j 
ACCEPT

And restart Xenserver firewall with this commands:

service iptables restart

Now you should be able to browse to https://IPADDROfXenserver:1311 and logon with root and the root password.

If you want to enable SNMP Traps:
To make SNMP Traps working in DOM, you need to enable it:

nano /etc/snmp/snmpd.conf

insert at the buttom of the file:

trapsink IPADDR Communityname

And then restart SNMPD

service snmpd restart

To update Dell firmware tools, you can use this commands:

yum install $(bootstrap_firmware)
update_firmware --yes

This will run for some time.