пятница, 5 мая 2017 г.

GlassFish ports notes

glassfish/bin/asadmin start-domain
Web page: http://localhost:8080
Secure web page: http://localhost:8181
Managment page: http://localhost:4848

Allow access to managment console from other hosts:
glassfish/bin/asadmin enable-secure-admin
glassfish/bin/asadmin stop-domain domain1
glassfish/bin/asadmin start-domain domain1


CentOS7:
firewall-cmd --zone=pubic --add-port=4848/tcp --permanent
firewall-cmd --zone=pubic --add-port=8080/tcp --permanent
firewall-cmd --zone=pubic --add-port=8181/tcp --permanent
firewall-cmd --reload


How to import certificate into Java keystore

keytool \t-import -alias certificate_alias \t-file path_to_certificate.cer \t-keystore path_to_jre/lib/security/cacerts

вторник, 8 ноября 2016 г.

zip: broken filenames

How to decompress zip-archive with broken filenames within (wrong codepage has been choosen while compressing):
7zip.exe -mcp=866 x archive.zip
....or any another codepage

zip: broken filenames

How to decompress zip-archive with broken filenames within (wrong codepage has been choosen while compressing):
7zip.exe -mcp=866 x archive.zip
....or any another codepage

вторник, 27 сентября 2016 г.

Curl authorization

curl --user name:password http://www.example.com
curl --proxy-user proxyuser:proxypassword curl.haxx.se
If your proxy requires the authentication to be done using the NTLM method, use --proxy-ntlm, if it requires Digest use --proxy-digest.

From here: http://stackoverflow.com/questions/3044315/how-to-set-the-authorization-header-using-curl

четверг, 21 апреля 2016 г.

SCCM 2012: deployment issue

Deployment is stucked with state "Waiting for content".
Solution is to check software package property and go to distribution settings and the check automatically download content when packages are assigned to distribution point.


https://social.technet.microsoft.com/Forums/en-US/90596148-55b7-415d-ac0f-558e00e6df8e/the-content-status-of-a-package-is-stuck-in-in-progress-waiting-for-content-status-in-sccm-2012?forum=configmanagerapps

четверг, 26 февраля 2015 г.

windows 7 autologin

  1. Click Start, click Run, type regedit, and then click OK. In Windows Vista/7, simply type regedit in Start Search and hit Enter.
  2. Navigate to the following registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
  3. Double-click the DefaultUserName entry, type the user name to log on with, and then click OK.
    If DefaultUserName registry value name is not found, create a new String Value (REG_SZ)with value name as DefaultUserName.
  4. Double-click the DefaultPassword entry, type the password for the user account under the value data box, and then click OK.
    If there is no DefaultPassword value, create a new String Value (REG_SZ) with DefaultPassword as the value name.
    Note that if no DefaultPassword string is specified, Windows automatically changes the value of the AutoAdminLogon registry key from 1 (true) to 0 (false) to turn off the AutoAdminLogonfeature.
  5. In Windows Vista/7, DefaultDomainName has to be specified as well, else Windows will prompt for invalid user name with the user name displayed as .\username. To do so, double click on DefaultDomainName, and specify the domain name of the user account. If it’s local user, specify local host name.
    If the DefaultDomainName does not exist, create a new String Value (REG_SZ) registry key with value name as DefaultDomainName.
  6. Double-click the AutoAdminLogon entry, type 1 in the Value Data box, and then click OK.
    If there is no AutoAdminLogon entry, create a new String Value (REG_SZ) with AutoAdminLogon as the value name.
  7. If it exists, delete the AutoLogonCount key.
  8. Also if it exists, delete the AutoLogonChecked key.
  9. Quit Registry Editor.
  10. Click Start, click Restart, and then click OK.

четверг, 19 февраля 2015 г.

Zabbix authorization: switch to default, reset password

Switching authorization mode to default


update config set authentication_type=0;


Reset admin password

update zabbix.users set passwd=md5('mynewpassword') where alias='Admin';

вторник, 20 января 2015 г.

Отключение проверки цифровой подписи драйвера

Откройте редактор локальной групповой политики, набрав gpedit.msc
В меню политик перейдите в раздел User Configuration->Administrative Templates-> System->Driver Installation.
В правой панели найдите пункт ‘Code Signing for Device Drivers’ и дважды щелкните по нему.
В появившемся окне выберите ‘Enabled’, а в нижнем меню – ‘Ignore’. Нажмите Ок и перезагрузите компьютер. После перезагрузи и применения политика, в своей Windows 7 вы полностью отключите подписывание драйверов, и сможете установить любые, в том числе, неподписанные драйвера.

понедельник, 19 января 2015 г.

Windows: how to remap right ALT to left ALT


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,38,00,38,e0,00,00,00,00

Switch layout by pressing Caps Lock: http://playground.teerapap.net/2008/03/switch-input-language-by-caps-lock.html 

среда, 8 октября 2014 г.

CentOS 7 + Apache + Firewall

To make apache visible from network in CentOS 7 you must create some exceptions:
firewall-cmd --permanent --zone=public --add-service=http 
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload

вторник, 7 октября 2014 г.

Gnome3 + Vino: VNC Viewer connection failed.

Temporary fix is: settings set org.gnome.Vino require-encryption false

From here: http://unix.stackexchange.com/questions/77885/how-can-i-connect-to-gnome-3-with-a-windows-vnc-client

четверг, 29 мая 2014 г.

CIsco 1131: VLans + MultiSSID

For a subject support you need to add to config next lines:

dot11 ssid guests
   vlan 254
   authentication open
   authentication key-management wpa version 2
   mbssid guests-mode dtim-period 75
   wpa-psk ascii *************

interface Dot11Radio0
   encryption vlan 254 mode ciphers aes-ccm
   ssid guests
   mbssid
interface Dot11Radio0.254
   encapsulation dot1Q 254
   bridge-group 254
interface FastEthernet0.254
  encapsulation dot1Q 254
  no ip route-cache
  bridge-group 254
  no bridge-group 254 source-learning
  bridge-group 1 spanning-disabled

P.S.: If you're getting errors like "Sending station has left the BSS" try to use only wpa2 + aes or wpa + tkip.

понедельник, 26 мая 2014 г.

openssh + Cisco

After update OpenSSH cannot connect to Cisco routers (1841, 3550). After some searching on the Web I found a similar bug #1026430 in on Red Hat Bugzilla.Solution was to add KexAlgorithms=diffie-hellman-group1-sha1 option to ssh command while connecting to routeres.
Another method is to create ~/.ssh/config with a couple of lines:

Host bigrouter
        HostName        192.168.0.1
        KexAlgorithms   diffie-hellman-group1-sha1

понедельник, 19 мая 2014 г.

Linux-to-cisco: IPIP

Cisco global IP - xxx.xxx.xxx.xxx
Cisco ipinip IP - 10.1.252.5/30
Linux global IP - yyy.yyy.yyy.yyy
Linux ipinip IP - 10.1.252.6/30

IPIP

host

sudo ip tunnel add tun0 mode ipip remote xxx.xxx.xxx.xxx local yyy.yyy.yyy.yyy
sudo ip addr add 10.1.252.6/30 dev tun0
sudo ip link set up dev tun0

router

interface Tunnel173
 ip address 10.1.252.5 255.255.255.252
 tunnel source xxx.xxx.xxx.xxx
 tunnel destination yyy.yyy.yyy.yyy
 tunnel mode ipip
 keepalive 15
exit

IPSec

host

/etc/racoon/racoon.conf:
log debug;
path pre_shared_key "/etc/racoon/psk.txt";
listen {
        adminsock "/var/run/racoon/racoon.sock" "root" "operator" 0660;
}
remote xxx.xxx.xxx.xxx {
        exchange_mode main;
        initial_contact on;
        proposal_check obey;
        proposal {
                encryption_algorithm 3des;
                hash_algorithm md5;
                authentication_method pre_shared_key;
                dh_group modp1024;
        }
}
sainfo address yyy.yyy.yyy.yyy/32 4 address xxx.xxx.xxx.xxx/32 4 {
        lifetime time 1800 seconds;
        encryption_algorithm 3des;
        authentication_algorithm hmac_md5;
        compression_algorithm deflate;
        pfs_group 2;
}


/etc/ipsec-tools.conf:
#!/usr/sbin/setkey -f
flush;
spdflush;
spdadd yyy.yyy.yyy.yyy/32 xxx.xxx.xxx.xxx/32 ipencap -P out ipsec
        esp/transport/yyy.yyy.yyy.yyy-xxx.xxx.xxx.xxx/require;
spdadd xxx.xxx.xxx.xxx/32 yyy.yyy.yyy.yyy/32 ipencap -P in ipsec
        esp/transport/xxx.xxx.xxx.xxx-yyy.yyy.yyy.yyy/require;

router

crypto isakmp key keymaster address yyy.yyy.yyy.yyy
crypto map VPN-CM 173 ipsec-isakmp
 set peer yyy.yyy.yyy.yyy
 set transform-set VPN
 set pfs group2
 match address IPSEC-173
exit
ip access-list extended IPSEC-173
 permit ipinip host xxx.xxx.xxx.xxx host yyy.yyy.yyy.yyy
end

вторник, 11 марта 2014 г.

How to locate path to a file from an inode number

As for Ext4 filesystem next command should help you:
$ sudo debugfs -R 'ncheck 393094' /dev/sda2 2>/dev/null


Answer source: http://unix.stackexchange.com/questions/35292/quickly-find-which-files-belongs-to-a-specific-inode-number#comment47948_35310

четверг, 27 февраля 2014 г.

Touchpad support in Debian on Dell 7720

1. Download the latest driver source code package from here (currently newest package is 1.3): http://www.dahetral.com/public-download

2. Then run these commands:
sudo apt-get install dkms
tar -xf psmouse-alps-dst-X.X.tbz
sudo mv usr/src/psmouse-alps-dst-X.X/ /usr/src/psmouse-alps-dst-X.X/
sudo dkms add psmouse/alps-dst-X.X
sudo dkms autoinstall
sudo rmmod psmouse && sudo modprobe psmouse