Installing HP Data Protector 6 on Ubuntu 14

The following worked fine on Linux Ubuntu 14 LTS from Bitnami (Redmine) Virtual Image.

Install apg-get install rpm  netkit-inetd

add to line to inetd.conf if it’s not there

cat /etc/inetd.conf omni stream tcp nowait root /opt/omni/lbin/inet inet -log /var/opt/omni/log/inet.log

then install using omnish.

chmod +x omnisetup.sh
./omnisetup.sh -server (your HP DP Manager) -da

Allow a firewall wall

ufw add 5555

then check

ufw status

Some info taken from here as well.

Once all done check if you can telnet to port 5555

telnet your_server_ip 5555

http://www.brucalipto.org/linux/how-to-install-data-protector-60-on-ubuntu-linux-704/

How to fix Disabling 1.0 TLS post installation issues

If you disabled support for old TLS 1.0 version and you are only supporting TLS 1.2 you may end up having some problems within your environment. This is normally disabled because of the new PCI/DSS requirements.

The below is a list of common issues and what to do to fix it.

To fix Remote Desktop Connection install the following: (Windows 7 Users Only)

Users will not be able to connect to remote servers.

https://support.microsoft.com/en-gb/kb/2592687

https://support.microsoft.com/en-gb/kb/3097192

To fix SQL Management Studio connection use the following: (Any Windows) 

Users will not be able to use SQL Management Studio to connect to databases

Install .Net 4.6 or 4.6.1

https://www.microsoft.com/en-gb/download/details.aspx?id=48130

To fix local IIS copies. use one of the following depending on .Net version and Windows version.

Users will not be able to run local copies under IIS. Storefront error will appear on the local site.

You need to update one of the .Net version depending on which version your local site is running.

ADO.NET – SqlClient (.NET Framework 4.5.2, 4.5.1, 4.5)

Hotfix rollup 3099842 for the .NET Framework 4.5.2, 4.5.1, and 4.5 on Windows 8.1 and Windows Server 2012 R2

Hotfix rollup 3099844 for the .NET Framework 4.5.2, 4.5.1, and 4.5 on Windows 8 and Windows Server 2012

Hotfix rollup 3099845 for the .NET Framework 4.5.2 and the .NET Framework 4.5.1 on Windows 7 Service Pack 1/ Windows Vista and Windows Server 2008 R2/Windows Server 2008

ADO.NET – SqlClient (.NET Framework 4.0)

Hotfix rollup 3106994 for the .NET Framework 4.0 in Windows

ADO.NET – SqlClient (.NET Framework 3.5/.NET Framework 2.0 SP2)

Hotfix rollup 3106990 for the .NET Framework 2.0 SP2 in Windows Server 2008 SP2 and Windows Vista SP2

Hotfix rollup 3106990 for the .NET Framework 2.0 SP2 in Windows Server 2008 SP2 and Windows Vista SP2

Hotfix rollup 3106992 for the .NET Framework 2.0 SP2 on Windows Server 2012 and Windows 8

Hotfix rollup 3106993 for the .NET Framework 2.0 SP2 in Windows Server 2012 R2 and Windows 8.1

and also other updated you may need installing to fix other problems.

https://support.microsoft.com/en-gb/kb/3135244

and also Microsoft Tutorial

https://blogs.msdn.microsoft.com/markweberblog/2015/12/01/sql-server-support-for-pci-dss-3-1/

Have fun!

 

 

 

How to fix nf_conntrack: automatic helper assignment is deprecated and it will be removed soon

More info here:

Since Linux 3.5, it is possible to desactivate the automatic conntrack helper assignment. This can be done when loading the nf_conntrack module

modprobe nf_conntrack nf_conntrack_helper=0

This can also be done after the module is loading by using a /proc entry

echo 0 > /proc/sys/net/netfilter/nf_conntrack_helper

By doing this, the following modules will be deactivated on all flows by default:

  • ftp
  • irc
  • sane
  • sip
  • tftp

https://home.regit.org/netfilter-en/secure-use-of-helpers/

How to disable bitnami VM swap

At some point you may want to change the size of swap or create your own and disable it.

The file containing the swap file can be found in

root@redmine:/# grep -rnw /opt/ -e “bitnami.swap”
/opt/bitnami/scripts/init/swap_file:9:SWAPFILE=/mnt/.bitnami.swap

You can increase it by changing SWAPSIZE=650000 or

. /opt/bitnami/scripts/init/functions

SWAPFILE=/mnt/.bitnami.swap
SWAPSIZE=650000
instance_type=`get_generic_instance_type`
if [ “x$instance_type” = “xmicro” ] || [ “x$1” = “x–force” ] ; then
if ! (swapon -s | grep -q $SWAPFILE) && test $SWAPSIZE -lt `df -k |grep -m1 -e ‘/$’|awk ‘{print $4}’`; then
rm -f $SWAPFILE
dd if=/dev/zero of=$SWAPFILE bs=1K count=$SWAPSIZE
mkswap $SWAPFILE
swapon $SWAPFILE
fi
else
rm -f $SWAPFILE
fi

or disable creation of this swap during start up by  taking -x from the init file

cd /opt/bitnami/scripts/init/functions

chmod -x swap_file

All done.

restart your VM and ‘dmesg’ to check that is not creating itself.

game crashing

Useful Windows/Linux/Networking Command

List of useful commands for System Engineer. Please comment if you think something needs adding.

LINUX

  • GENERAL

uname -ar – Kernel/Hosthame information

crontab -e  – edit crontab file for current use

lspci – List all PCI devices

wbinfo -u – list AD users

wbinfo -g -list AD groups

  • APACHE

openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr – request a csr

openssl pkcs12 -export -out cert.pfx -inkey privateKey.key -in certificate.crt exporting key and crt into pfx file

apachectl -k graceful – reload config without restarting apache server.

apachectl configtest – check configuration files before reload

  • APACHE CONF

RedirectMatch ^/redmine/(.*)$ https://redmine.example.com/$1 – simple redirect from http://redmine.example.com/redmine/ to https://redmine.example.com/

  • SWAP/MEMORY

swapon -s – swap summary

free -m – show memory usage

  • LOCALE/LANGUAGE

dpkg-reconfigure keyboard-configuration – used to reconfigure keyboard layout e.g. from US to GB

locale-gen en_GB.UTF-8 – generate UK locale

  • DNS

named-checkconf example.com example.com.zone – to check zone before reloading

rndc reload example.com – to reload the zone in bind

  • SAMBA

smbclient //servername/shareName -U user – testing share access

testparm -s /etc/samba/smb.conf – test samba configuration

netstat -tulpn | egrep “samba|smbd|nmbd|winbind” – check on which ports samba is listening

smbd reload-config – reload config without restart service

  • POSTFIX

mailq – display email queue

mailq | wc -l – show number of emails

postcat -q 248DEAB – read messages 248

qshape – display statistics

mailq | awk ‘/^[0-9,A-F]/ {print $7}’ | sort | uniq -c | sort -n – display domain send by from in order.

mailq| grep ‘^[A-Z0-9]’|grep @example.com|cut -f1 -d’ ‘ |tr -d \*|postsuper -d – -remove all emails send by example.com from queue

USEFUL FILE LOCATION LINUX

/opt/bitnami/apps/redmine/conf/httpd-vhosts.conf – Bitnami Redmine Configuration

tail -f /var/log/mail.info – display mail log entries on the fly

tail -f /var/log/mail.log  – mail log

tail -f example.log | grep –line-buffered ‘pattern’ – filter tail output using grep

WINDOWS

cmd>dir > list.txt – to export list of files from current directory

cmd>slui 3 – Windows activate windows

cmd>slui 4 – Windows Phone Activation

sfc /scannow – scan and reapair missing or corrupted system files

cmd gpresult /Scope Computer /v – display which gpo has been applied

msinfo32 – view advance computer information remotely

rd /s $RECYCLE.BIN – remove files from recycle bin

pskill \\REMOTE_SERVER_NAME  winlogon – kill winlogon if shutdown hangs

regedit then HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\InstallDate – to check Windows Installation Date in unixtime 🙂

regedit HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\ProfileImagePath – Folder to user assignment in Windows.

rsop.msc – result of policy setting

slmgr.vbs (C:\Windows\System32\) – Licencing info

Dism.exe /online /Cleanup-Image /StartComponentCleanup – (W2012) – Removing old superseded updates (https://technet.microsoft.com/en-gb/library/dn251565.aspx)

Powershell

[environment]::Version – check powershell version

Get-PSSnapin -Registered -to display registered snap-in in powershell

Get-Hotfix -computername SEA-SRV-01 | Select HotfixID, Description, InstalledOn | Sort-Object InstalledOn – get a list of Hotfixes installed on the pc

net statistics server or systeminfo | find “System Boot Time:” \ find “Stati” – to check windows uptime.

Run: Get-Process ¦ select ID, name, starttime – get a list of processes

get-executionpolicy / set execution policy unrestricted – allow all script to be run on the pc

Install-WindowsFeature Desktop-Experience – Install cleanmgr on Windows 2012+

EXCHANGE

Test-ReplicationHealth | Select-object Check, Result, Error – to test replication health.

USEFUL FILE LOCATION

\\domainName\sysvol – location of domain polices / logon scripts.

CISCO

show version – to check version and uptime

show ip interface brief – show all ports info

show cdp neighbords – show neighboard config.

show ip bpg summary | include xxx.xxx.xxx.xxx – bgp session info

show interfaces trunk – show vlan to port summary

show mac address-table dynamic vlan 100 – show mac address by

show arp | include 192.168 (filter output) – http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/configuration/15_sy/fundamentals-15-sy-book/cf-cli-search.html

copy flash tftp  – backs up the Cisco IOS to a TFTP server.

MYSQL

SHOW GRANTS FOR ‘root’@’localhost’; – display root rights

GRANT ALL PRIVILEGES ON *.* TO ‘root’@’localhost’ – give root privileges to everything then flush privileges; or use % if it’s listening on everything.

netstat -tap | grep mysql – check on which ports MySQL is running

set password for user = PASSWORD(‘mypass’); – set a password to a user

sudo /opt/bitnami/ctlscript.sh restart mysql – Restart Bitnami MySQL

in my.cnf change bind-address = 0.0.0.0 to allow MySQL to listen on all ports.

C:\Windows\System32\sysprep\sysprep.exe – OOBE/Generalize/Reboot – this will remove all PC settings so the image can be used for many pc.

SQL Server

select @@servername go – server name and instance
select @@version go – version – check version MS SQL 2012 SP1
select serverproperty(‘edition’) go – check edition eg standard

SELECT * FROM sys.configurations WHERE name = ‘clr enabled’ – to check if CLR is enabled. (Allows to run user defined function/stored procedures etc).

SECURITY

arachni http://example.com –report-save-path=/root –checks=active/* –scope-auto-redundant –scope-directory-depth-limit=3 –platforms=windows,mssql,iis,aspx – scanning site with arachni

arachni_reporter /path/to/report.afr –reporter=html:outfile=path/to/report.html.zip – convert arachni report into html.

No space left for device when importing Bitnami VM into ESXI

To resolve this issue you need first convert the vm from Bitnami to Workstation then convert it to ova/ovf format then you should you be able to import in to ESXi with no issues

Othewise you may end up with the following error:

Line 62: No space left for device ‘5’ on parent controller ‘3’.

I hope this resolve your issue.

Link for files:

v4.3 Converter https://my.vmware.com/group/vmware/details?downloadGroup=CONVERTER430&productId=27

Bitnami Redmine VM

https://bitnami.com/stack/redmine/virtual-machine

Other useful info:

https://wiki.bitnami.com/Native_Installers_Quick_Start_Guide#How_to_upgrade_the_full_Stack_migrating_the_data.3f

This will also resolve problem reported here

https://communities.vmware.com/thread/299949?start=0&tstart=0

You can download VM Converter from here if you are having problems finding it.

https://drive.google.com/file/d/0B_FMdpdPSHUpd3NFMks1aUhXNWs/view

How to disable ctr alt del on linux to disable shutdown

Ubuntu

etc/init/control-alt-delete.conf

# ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

initctl reload-configuration
Ubuntu 9.04

/etc/event.d/control-alt-delete

initctl reload-configuration
Debian

/etc/inittab

init q

CentOS

/etc/inittab