Search This Blog

Thursday, December 01, 2016

SCO SysV Cannot enable remote printing (mkdev rlp) after the installation of an Update Pack 2/3 or a Maintenance Pack

"Unable to get complete data for 'Printer Manager on ...
Failed to retrieve list of remote printers.    
The TCP/IP rlp remote printing package is not installed...."
According to the documentation of Update Pack x and Maintenance
          Pack x, "mkdev rlp" MUST be run before applying Update Pack x or
          when including CUPS as part of the installation of the Maintenance
          Pack as detailed in:
          CUPS and Remote Printing (LPD)
          Although CUPS supports LPD as both a server and a client, the CUPS
          LPD server implementation does not support access control (based on
          the settings in the /etc/hosts.equiv and /etc/hosts.lpd files).
          If your setup requires the use of the standard LPD, or you wish to
          use access control, do not install CUPS.
WARNING  If you have never run mkdev rlp and you wish to do
          so, the CUPS package must be removed before running mkdev rlp
          and then reinstalled after remote printing is configured.
on a system-wide basis in /etc/default/lpd. The default entry is
            for the SYSV print system:


          If you already had run "mkdev rlp" and have added the Maintenance
          Pack and are now unable to run "scoadmin printer" -> Printer ->
          Add Remote (ie. (UNIX) ) is not able to be highlighted to add new
          Remote Printers then the cause is /usr/lib/mkdev/rlp is missing.

          The file 'rlp' is kept in /usr/lib/lp/sysv/save and can be copied
          back to /usr/lib/mkdev/rlp

          This issue has been reported to SCO Engineering.

          If you need CUPS to be removed in order for you to use LPD as
          detailed above in the Maintenance Pack installation notes BUT also
          require SAMBA to be used then please note that the removal of CUPS
          will also remove a number of libraries vital to Samba from /usr/lib:



          Which should be copied and placed back into /usr/lib after CUPS has
          been removed in order for SAMBA 3.0.20A to function otherwise you
          may see:

          # /etc/init.d/smb start
          dynamic linker : /usr/sbin/smbd : could not open

Tuesday, November 01, 2016

DR/Migrate Sco SysV

1)      Reinstall SCO Base system
2)      Copy /etc/conf to a backup directory (ie: copy –ormv /etc/conf /usr/rcvr/conf)
3)      Remove all contents of /etc/conf (cd /etc/conf && rm –r /etc/conf/*)
4)      Change file creation mask on root filesystem (cd / && umask 0)
5)      Restore tape excluding /dev & /stand (cpio –icvdmufB< /dev/rStp0 “dev/*” “stand/*” )
6)      Copy ttytype & inittab to backup directory (ex: cp /etc/inittab /usr/rcvr/ )
7)      Use SCOadmin to relink the kernel
8)      If asked to rebuild environment answer (y)YES
9)      Put back inittab & ttytype form the backup (ex: cp /usr/rcvr/inittab  /etc/inittab)
     10)     Reboot & have a Beer

Thursday, October 20, 2016


Totally forgot

Monday, October 03, 2016

Put the backup on a remote tape via ssh

   tar --verbose --exclude=/proc --exclude=/sys --exclude=/tmp --exclude=/mnt --totals -b2048 -jcpvf $SRC | ssh root@ $(mt -f /dev/st0 rewind; cat > /dev/st0)

ssh root@ "cat /dev/st0" | tar --exclude=/proc--exclude=/sys --exclude=/tmp --exclude=/mnt --totals -b2048 -jxpvf $DES

Thursday, September 01, 2016

CMD tmpwatch / logwatch

@echo off
:: (c)2015

set watchdir="C:\Program Files\Research In Motion\BlackBerry Enterprise Server\logs"

:: remove older files
forfiles /p %watchdir% /s /m *.* /c "cmd /c Del @path" /d -30
:: remove empty folders !!! cd on a different drive first, if that's the case !!!
:: D:\
cd  %watchdir%
for /f "tokens=*" %d in ('dir /ad/b/s ^| sort /R') do rd "%d"

Shorter version:
forfiles /p [PATH] /s /m [FILE-PATTERN] /D -[MM/DD/yyyy] /c "cmd /c del @path"
for /f "delims=" %%d in ('dir [PATH] /s /b /ad ^| sort /r') do rd "%%d"

Monday, August 01, 2016

Capture sVideo and audio with the USB Easycap 2.0 - make... make install

./somagic-extract-firmware SmiUsbGrabber3C.sys
(the .sys file can be obtained either from the win32 install kit or

cp somagic_firmware.bin /usr/lib/firmware/

somagic-init -f /usr/lib/firmware/somagic_firmware.bin && somagic-capture -n -s --sync=1 --iso-transfers 80 | ffmpeg -f rawvideo -pix_fmt uyvy422 -s 720x480 -y -an -r ntsc -i - -f pulse -i default -aspect 4:3 -qmin 1 -qmax 10  output.avi

Monday, July 04, 2016

Your system administrator does not allow the use of saved credentials to log on to the remote computer RDP terminal server because its identity is not fully verified.

In order to use saved RDP or Terminal Server credentials you need to do the following:

1. On the local machine, Open Group Policy Editor via Run -> gpedit.msc
2. Navigate to Local Computer Policy>Computer Configuration>Administrative Templates>System>Credentials Delegation

3.Open Setting Allow Delegating Saved Credentials with NTLM-only Server Authentication, set it to Enabled click on button Show... and in Show Contents window add Value TERMSRV/*. Close the windows by pressing OK.

*Repeat step 3 on the following settings:
Allow Delegating Default Credentials
Allow Delegating Saved Credentials
Allow Delegating Default Credentials with NTLM-only Server Authentication

4. Open comman prompt and enter gpupdate /force command to update your policy.

Wednesday, June 01, 2016

kill dial-up if a program runs for more than 15 min or it doesn`t run at all

@echo off
:: (c)2015


:: echo Checking if EDI (Gedi_dsk.exe) runs for more than 15 min and disconect if true
for /F "tokens=1" %%t in ('tasklist /FO TABLE /FI "CPUTIME gt 00:15:00" /FI "IMAGENAME eq Gedi_dsk.exe"') do (
if "%%t" ==  "Gedi_dsk.exe" (rasdial /disconnect >NUL )

::the same result can be obtained using pslist:
::for /F "tokens=11 delims=: " %%f in ('"pslist Gedi_dsk 2>NUL"') do (
::if %%f geq 15 ( rasdial /disconnect >NUL )

:: echo if EDI is not started wait a few seconds try again, then disconnect if it is still not there
for /F "tokens=1" %%t in ('tasklist /FI "IMAGENAME eq Gedi_dsk.exe" 2>NUL') do (
if NOT "%%t" ==  "Gedi_dsk.exe" (
:: echo program not running wait a few seconds and check again
ping -n 5 -w 1000 >NUL
for /F "tokens=1" %%t in ('tasklist /FI "IMAGENAME eq Gedi_dsk.exe" 2>NUL do (
if NOT "%%t" ==  "Gedi_dsk.exe" ( rasdial /disconnect >NUL )

Monday, May 02, 2016

Autodiscover and/or EWS unavailable on Exchange 2007/2010

Symptom: Outlook crashes or you cannot access OutOfOffice settings after you install a package that contains the .NET Framework 3.5 with SP1 and the .NET Framework 2.0 with SP2 on an Exchange 2007 or on an Exchange 2010 server (CAS role)

Problem described in:

My solution:

Turn of any mmc, powershel console, emc etc.

Uninstall .net 3.5 sp1
Uninstall .net 3.0 sp2
Uninstall .net 2.0 sp2

In this order, without restarting!
if it complains that "you can't uninstall, some other package depends on it", do this:

net stop MSExchangeTransportLogSearch /yes
net stop MSExchangeTransport /yes
net stop MSExchangeServiceHost /yes
net stop MSExchangeSearch /yes
net stop MSExchangeRepl /yes
net stop MSExchangePop3 /yes
net stop MSExchangeMailSubmission /yes
net stop MSExchangeMailboxAssistants /yes
net stop MSExchangeIMAP4 /yes
net stop MSExchangeFDS /yes
net stop MSExchangeSA /yes
net stop MSExchangeEdgeSync /yes
net stop MSExchangeAntispamUpdate /yes
net stop MSExchangeADTopology /yes
net stop MSExchangeIS /yes
ping -n 5 -w 1000 >nul
net stop w3svc /yes

If you still can't uninstall, use procexp's "find" feature and close any .NET handle still open.

At the end there should be no reference to .NET in the installed programs.

Install .net 3.0 (I used version 3.0.4506.30 downloaded in 2008 an forgotten on server...)

[PS] Remove-AutodiscoverVirtualDirectory -Identity "EXCHANGE2007\Autodiscover (Default Web Site)"
[PS] New-AutodiscoverVirtualDirectory
[PS] Set-ClientAccessServer -Identity "EXCHANGE2007" -AutoDiscoverServiceInternalUri https://exchange2007.domain.tld/autodiscover/autodiscover.xml
[PS] Test-OutlookWebServices | fl

If you receive Error 401 when attempting to run Test-OutlookWebServices | FL, disable the loopback check in  HKLM\SYSTEM\CurrentControlSet\Control\Lsa  "DisableLoopbackCheck" DWORD, 1

- In IIS Manager make sure ASP.NET 2.0.50727 is ENABLED
- In IIS Manager make sure Autodiscovery and EWS uses only "Integrated windows authentication" and that the security cert is "require ssl", "128 bit" and "ignore client certificates"

- Verify that the folder %ExchangeInstallaDir%\ClientAccess\Autodiscover is readable by "authenticated users"
 - perform iisreset /noforce

[PS] Test-OutlookWebServices | FL should give you a good answer now, if not, make sure the autodiscover DNS entry exists:

- in DNS Manager rightclick the local forward lookup zone, "Other new records", "SRV", service "_autodiscover", pri "10", weight "5", port "443", host "autodiscover.domain.tld"
- in DNS Manager, new A-Record "autodiscover.domain.tld"

[PS] Test-OutlookWebServices | FL should give you a good answer now, if not, get the backup tape, it's that time...

Monday, April 04, 2016

Space "Magically" missing on Win 2012 drives

An apparently (almost) empty drive might show low space but looking at the files found that only a few GB was being consumed. Upon checking on the drive turned on show hidden on the server in a folder called System Volume Information.

The System Volume Information folder is a hidden system folder that the System Restore tool (XP, Vista/7/8) uses to store its information and restore points, it is also used by shadow copies for  backups and other purposes on Windows 2003/2008 and 2012. There is a System Volume Information folder on every partition on your computer.

So how do you reclaim the space? Well there are two ways either through the GUI or the command line to recover space that system restore is not using. Special Note: if you do this on SQL servers it will stop the MSSQL service.

CLI Method

Open a command prompt with the “Run as Administrator” option. Type in vssadmin list shadowstorage

As you can see the output shows used Space, Allocated Space and Maximum Space.

We can also see what available restore information is available by running vssadmin list shadows

So now let’s get to reclaiming the space on one of the drives. In the issue I had with disappearing space was with the F:\ drive. So to reclaim it I want to resize the maximum allocated space setting to 1 GB. The syntax is:

vssadmin resize shadowstorage /on=[here add the drive letter]: /For=[here add the drive letter]: /Maxsize=[here add the maximum size]

For Example:

vssadmin resize shadowstorage /on=F: /For=F: /Maxsize=1GB

To validate the changes took run vssadmin list shadowstorage.

Repeat the steps to make the changes to other drives and the space will be recovered.

GUI Method

Double click on Computer to see your drives. Right click on the drive in question and select Properties. Click on the shadow copies tab.

Select the drive in the list and click on the settings button. Check the Use Limit box and type in the amount in MB to which you want to set (1024 for 1GB) and click OK. Repeat for other drives until completed.

You are all done and now have more space.

Thursday, March 03, 2016

Boot parameters for SCO6 on HP Gen8 servers (officially unsupported)

Install an extra P400 controller and connect the drives cage to it. Do not disable the on-board i400!
Install an extra E1000 dual NIC, as the onboard BCMs are not recognized by the kernel.

In BIOS, switch the sata controller to ahci and boot.

The following parameters allow you to boot and install OSR6 on Gen8:

After the installation is done ( see sco-sysv-on-hp-server-install-notes ), only USE_XAPIC=Y have to be added to /etc/default/boot.

Wednesday, February 10, 2016

HP MSM Wifi for Guests - limit access only to GW and DNS

Custom filters:
inbound: ether proto 0x888E or arp or (((udp (udp src port 53 and udp dst port 53)port 68 and udp dst port 67) or (udp src port 53 or udp dst port 53) or ether dst %b or ether dst %w or ether dst %g or multicast) and ((ether proto 0x8863 or ether proto 0x8864 or ip) and not (multicast and (udp port 137 or udp port 138 or udp port 139))))

outbound: (udp src port 53 or udp dst port 53) or ((ether proto 0x888E or arp or ((udp dst port 68 or ether src %b or ether src %w or ether src host %g or multicast) and ((ether proto 0x8863 or ether proto 0x8864 or ip) and not (multicast and (udp port 137 or udp port 138 or udp port 139 or udp dst port 3490))))) and (not ether dst 01:00:0c:cc:cc:cc))

Tuesday, February 02, 2016

Install DD-WRT on Buffalo WZR-600DHP2

1 Download the Official DD-WRT image from

2 login to
username: bufpy
password: otdpopypassword

Click on telnetd, click on Start

3 telnet and type: "ubootenv set accept_open_rt_fmt 1"

4 point your browser to
5 upload the firmware you downloaded (and unziped) on step 1
6 wait.
7 wait.
9 wait some more time, then login to admin:password 
- enjoy DD-WRT!

(thanks to Guilherme Garnier for correcting me at the last step)

Firmware 2.27 and higher have a slightly different procedure:
1 login to username "bufpy" password "otdpopypassword"
2 In a new tab, go to the normal web interface at (automatically logged in in debug mode)
3 Click on the new button "debug-disp"
4 Click on the (second to last) link "admin", then on the (first) link "name"
5 Click on the last link ending in firmup.html
6 In this interface, any ".bin" firmware (i.e. not in the typical Buffalo .zip package) can be uploaded without validation. It should also be possible to downgrade to an earlier Buffalo stock firmware on this page.

Friday, January 08, 2016

Fix Windows 7 Boot

Fixing the Master Boot Record (MBR)

Step one: Boot from either your Windows 7 Installation DVD or Windows 7 System Recovery Disc.   Remember, you may need to change the boot order inside your BIOS to have the your DVD drive boot first.

Step two: After the installation or recovery disc loads, if prompted, select your language settings and then continue.   If you are using the installation DVD, when prompted by the following screen select Repair your computer.

Step three: The computer will take a moment now to scan itself for any Windows installations, after which you will likely be given a choice to select which installation you wish to repair.   Select the appropriate Windows installation from the list and then continue. If by chance a problem is detected in one of your Windows installations at this initial stage, the system may also ask you if it can try to repair the problem automatically. It is up to you if you wish to let the system try to repair itself, but otherwise just select No.  

Step four: Once you have reached the System Recovery Options screen, as shown below, you will be faced with a list of choices that can aid you in repairing a damaged Windows 7 operating system.   If you wish to try the Startup Repair option first, it is often successful in automatically fixing many different start up issues, but in this article we will be using the Command Prompt option to resolve our problems manually. So, click Command Prompt to continue.  

Step five: Now sitting at the command prompt, enter the following command and then press enter:

                bootrec.exe /FixMbr

If successful, you should be greeted with the message The operation completed successfully.   That's it!   Your Master Boot Record has been repaired.

While the above command does fix the MBR, and sometimes that is enough, there still might be an error with the system partition's boot sector and Boot Configuration Data (BCD). This might occur if you have tried to install another operating system alongside Windows 7, such as Windows XP.   To write a new boot sector, try the following command:

              bootrec.exe /FixBoot

If you are still faced with your Windows 7 installation not being detected during start up, or if you wish to include more than one operating system choice to your system's boot list, you can try the following command to rebuild your BCD:
              bootrec.exe /RebuildBcd

The above command will scan all your disks for other operating systems compatible with Windows 7 and allow you to add them to your system's boot list. If this fails, you may need to backup the old BCD folder* and create a new one in its place with the following commands:

              bcdedit /export C:\BCD_Backup
              cd boot
              attrib bcd -s -h -r
              ren c:\boot\bcd bcd.old
              bootrec /RebuildBcd

*Some users also find simply deleting the boot folder and retrying the above steps effective at resolving boot issues, but it is not recommended.

How to change active partitions

Upon purposely changing the active partition on my system drive, I was faced with a BOOTMGR is missing error during my system's start up that prevent Windows from starting. It is a common mistake to make when playing with partitions on a system drive and it can be a headache to solve if not prepared. To change your active partition back using the Windows 7 recovery disc or Installation DVD, follow the steps below.

Step one: Follow steps one to four in the above guide. This should take you to the Command Prompt in the Windows Recovery Environment.

Step two: Type DiskPart and then press Enter.

Step three: Type List Disk now and then press Enter. This command will list all disks attached to your computer and assign them a disk number.

Step four: Type Select Disk x, where x is the number for the disk containing the partition you wish to make active. Press Enter.

Step five: Type List Partition and then press Enter. You will now be shown a list of the partitions on the selected disk. Determine which partition you wish to make active.

Step six: Type Select Partition x, where x is the number of the partition you wish to make active.

Step seven: Now, just type Active and then press Enter. That should be it - the selected partition is now active.
How to create a Windows 7 System Recovery Disc

Windows 7 makes it easy to create a System Recovery Disc if you already have Windows 7 installed and running.  

Step one: Click Start > All Programs > Maintenance > Create a System Repair Disc

Step two: Insert a blank CD or DVD into your disc drive.

Step three: Click Create disc and let the program do its thing.
That's it! It only needs to write about 140- to 160-megabytes to the disc, depending on whether your OS is 64-bit or 32-bit, and that should only take a minute. If you do not have a CD/DVD-R drive to create a recovery disc with, you can alternatively download the ISO image of the Windows 7 System Recovery Disc and use it to make a bootable USB flash drive.

How to create a Windows 7 System Recovery USB flash drive

Step one: If you do not have a DVD drive, download the appropriate Windows 7 Recovery Disc image. Alternatively, if you have a DVD drive, you can use an existing Windows 7 Installation DVD or a Windows 7 Recovery Disc when at step seven.  

Using a Windows 7 Installation DVD at step seven will also allow you to install Windows 7 via USB, not just recover a damaged system; very useful if you have a netbook!

Step two: Open a command prompt with administrative rights. To do this, click Start > All Programs > Accessories and then right click Command Prompt, followed by clicking Run as administrator.

Step three: After accepting any UAC verification questions, you should now be at the command prompt. Make sure your USB flash drive is plugged in and then type DiskPart, followed by pressing Enter.

Step four: Type List Disk and then press Enter. Determine which disk number corresponds to your USB flash drive. In the following scenario, Disk 1 corresponds to our USB drive since we know our USB drive has a capacity of 2-gigabytes.

Step five: Enter the following commands in order, changing the disk number to the disk number listed for your USB drive.   Warning - the following commands will erase everything on your USB drive or the disk you select.
              Select Disk 1
              Create Partition Primary
              Select Partition 1
              Format FS=NTFS
Step six: After DiskPart successfully formats the USB drive, which might take a few minutes, you will want to enter the following commands:

Step seven: You will now need to copy the contents of the ISO image you downloaded, or the contents of a DVD you wish use, to the USB flash drive.   There should be two folders and a file in the ISO image that need to be copied. To extract the files contained within an ISO image, you will need to use a program such as 7-zip.

Step eight: Now that the files are copied, we will want to make the USB drive bootable. To accomplish this however we will need to download a small file called bootsect.exe; it can be found in the boot directory of the Windows 7 Installation DVD.  Once downloaded, place the bootsect.exe file in the root directory of your USB flash drive.

Step nine: Back at the command prompt, we will want to change the current directory to that of the USB drive and run the bootsect command. In our case this is drive E, so we will be using the following respective commands:

                 bootsect /nt60 e:

The bootsect command will update the target volume with a compatible bootcode. If all goes well, you should now have a bootable USB recovery drive; just remember to add the USB drive to the boot list in your system's BIOS for it to work upon start up.

Wednesday, January 06, 2016

Exchange2010 on Windows2012 - my way

Install-WindowsFeature RSAT-ADDS, AS-HTTP-Activation, Desktop-Experience, NET-HTTP-Activation, NET-Framework-45-Features, RPC-over-HTTP-proxy, RSAT-Clustering, RSAT-Clustering-CmdInterface, RSAT-Clustering-Mgmt, RSAT-Clustering-PowerShell, Web-Mgmt-Console, WAS-Process-Model, Web-Asp-Net45, Web-Basic-Auth, Web-Client-Auth, Web-Digest-Auth, Web-Dir-Browsing, Web-Dyn-Compression, Web-Http-Errors, Web-Http-Logging, Web-Http-Redirect, Web-Http-Tracing, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Lgcy-Mgmt-Console, Web-Metabase, Web-Mgmt-Console, Web-Mgmt-Service, Web-Net-Ext45, Web-Request-Monitor, Web-Server, Web-Stat-Compression, Web-Static-Content, Web-Windows-Auth, Web-WMI, Windows-Identity-Foundation



merge this into registry:

--- CUT HERE ---
Windows Registry Editor Version 5.00


@="Add Microsoft-Windows-ApplicationResourceManagementSystem/Diagnostic"

@="Add Microsoft-Windows-ApplicationResourceManagementSystem/Operational"

--- CUT HERE ---

cdrom:\setup.exe /preparead

when runing setup DO NOT check "Automatically install Windows Server roles and features required for Exchange Server"

DO NOT START Exchange Management Console yet!

Install Exch2010 SP3


You may find that on Server2012 you can launch the Exchange Management Console, but are unable to expand any of the objects in the left hand pane.
Exchange 2010 Exchange Management Console was built with CLR (Common Language Runtime) version 2.0. Windows 2012/8 by default runs its MMC snap ins with CLR version 4.0.
to fix it, start cmd and type:

set COMPLUS_Version=v2.0.50727
"C:\Program Files\Microsoft\Exchange Server\V14\Bin\Exchange Management Console.msc"

Now you can do the usual stuff.

BTW: Don't be an idiot (like me), don\t install Eset RA Server before installing Exchange, that will put the Exchage RA web console on ports :80 and :443 and IIS will never start. 
netstat -a -b -n -p tcp is your friend in this case, run it and you will see who occupies your ports.

Monday, January 04, 2016

Reset the username and password on a Symbol WS-2000

Connect the WS-2000 to the PC using a standard 9F to 9F null modem cable 
(the old 3Com serial)
Baud Rate - 19,200
Data Bits - 8
Parity - None
Stop Bits - 1
Flow Control - None
Emulation needs to be set to "Autodetect" or "ANSI"

Power cycle the WS-2000.
While the WS-2000 is booting up, press and hold the ESC key (you'll see 
a boot> prompt).
This should bring you to the boot command line.
Type "passwd default".
Type "reboot".
After the system boots back up, the username and password should be set 
back to the default

Saturday, January 02, 2016

"FullyQualifiedErrorId : -2144108477,PSSessionOpenFailed"

The PowerShell window displayed this error.
VERBOSE: Connecting to
New-PSSession : [] Processing data from remote server failed
with the following error message: The WinRM Shell client cannot process the request. The shell handle passed to the WSMan Shell function is not valid. The shell handle is valid only when WSManCreateShell function completes successfully. Change the request including a valid shell handle and try again. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ New-PSSession -ConnectionURI “$connectionUri” -ConfigurationName Microsoft.Excha …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme….RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : -2144108212,PSSessionOpenFailed
The cause of this error in my specific case was that the SSL certificate was no longer bound to the Exchange Back End website on that Exchange 2013 server.
To fix this, in IIS Manager right-click the Exchange Back End website and click Bindings.

Highlight https and click Edit.
If you see “Not selected” like I did, click on Select.
Choose the certificate you want to bind to the site.
Apply the changes and retry the Exchange management shell. If it connects successfully to the server then you have most likely resolved this issue.

Blog Archive