<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2519996432850201840</id><updated>2024-10-22T02:37:45.062-07:00</updated><category term="gns3 linux install"/><category term="gns3 on mandriva"/><category term="Centos Secure server"/><category term="Centos dhcp.conf"/><category term="Cisco pix firewall config"/><category term="Horde Webmail"/><category term="Linux Webmail"/><category term="Linux secure server"/><category term="OSS Webmail Client"/><category term="SFTP Server"/><category term="SSH"/><category term="bash script"/><category term="bash while loop"/><category term="boot"/><category term="boot problem"/><category term="config backup"/><category term="copy schema of postgres"/><category term="dhcp server"/><category term="dump"/><category term="fedora x11vnc setup"/><category term="fedora16"/><category term="gns3 beta"/><category term="gns3 lab"/><category term="gns3 latest"/><category term="grub"/><category term="iptables"/><category term="linux boot problem"/><category term="linux firewall"/><category term="linux internet gateway"/><category term="menu.lst"/><category term="netfilter"/><category term="pix firewall"/><category term="postfix"/><category term="postgres schem duplicating"/><category term="postgresql"/><category term="schema renaming"/><category term="sender restriction"/><category term="vnc server"/><category term="x11vnc configuration"/><category term="x11vnc server"/><title type='text'>oHbEt.. configuration backup, how to, sample config and reminder..</title><subtitle type='html'>Cisco | Linux | Mandriva | Centos | FreeBSD | GNS3 | Windows 2003 | RedHat | LVM | Rhev 3</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://configs.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>73</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-6540424268914202211</id><published>2024-02-25T00:09:00.000-08:00</published><updated>2024-02-25T00:09:51.319-08:00</updated><title type='text'>Unable to turn on WSL feature on a Hyper-V Windows VM</title><content type='html'>&lt;p&gt;&amp;nbsp;The issue was due to the Virtualization Extension is not enable by default. Every time I tried running WSL after installing the WSL package, i am getting an error that Virtualization is not enabled on BIOS. I think this is a default error. It will not say to you, &quot;Opps, you are running under Hyper-V, enable it first&quot;. So after several google, you have to invoke the command as Admin via power shell.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Command:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;wsl --helpSet-VMProcessor -VMName mytestmv01 -ExposeVirtualizationExtensions $true&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;where mytestvm01 is the name of the VM i need to enable WSL and needs virtualization (seems like nested) extension like you do on your bios for none virtualized machine.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Then reconnect to your VM, you should be able to run now your WSL, ubuntu or what ever flavor of linux you like to enable or install that is available from MS.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/6540424268914202211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/6540424268914202211'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2024/02/unable-to-turn-on-wsl-feature-on-hyper.html' title='Unable to turn on WSL feature on a Hyper-V Windows VM'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-872212986179255593</id><published>2024-02-25T00:02:00.000-08:00</published><updated>2024-02-25T00:02:26.837-08:00</updated><title type='text'>WSL - Windows Subsystem for Linux networking issue - cannot connect to network when windows is connected to VPN</title><content type='html'>&lt;p&gt;&amp;nbsp;I have this issue on WSL on windows 11, when enabling this feature, by default the NetworkingMode is equal to NAT. No issue when connecting to internet from the bash CLI, but when you are connected to a VPN, like on a corporate VPN, the net setup will not allow you to connect to the internal resources. This is not a problem with WSL on Windows 10 though.&lt;/p&gt;&lt;p&gt;So to fix this, I need to set the NetworkingMode to mirrored. This way, what ever the IP you windows get, will have the same IP on your WSL or Linux Terminal.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To make your WSL networkingmode to mirrored, create a config file under your windows user profile.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;If my username is windows.user01, then put the config under C:\Users\windows.user01\&lt;/p&gt;&lt;p&gt;File: .wslconfig&lt;/p&gt;&lt;p&gt;Content of file below:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;[wsl2]&lt;/p&gt;&lt;p&gt;networkingMode=mirrored&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Or if you are on your bash command line, you can just do&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;vim /mnt/c/Users/oliver.jagape/.wslconfig&lt;/p&gt;&lt;p&gt;and enter below: then save.&lt;/p&gt;&lt;p&gt;[wsl2]&lt;/p&gt;&lt;p&gt;networkingMode=mirrored&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Shutdown WSL&lt;/p&gt;&lt;p&gt;--shutdown&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Then open back bash, or if you have windows terminal installed, just type bash, and it will open to Linux bash terminal.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/872212986179255593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/872212986179255593'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2024/02/wsl-windows-subsystem-for-linux.html' title='WSL - Windows Subsystem for Linux networking issue - cannot connect to network when windows is connected to VPN'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-8149199646787141738</id><published>2020-10-20T10:21:00.005-07:00</published><updated>2020-10-20T10:21:35.539-07:00</updated><title type='text'></title><content type='html'>&lt;p&gt;&lt;b&gt;SMTP Issues - Host or domain name not found - Encountered via trustwave Mailmarshal Email SEG&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Ok, so we have that issue that the gateway is unable to deliver via MX or even relaying to the MX hosts directly. To make the story short, we found out that the gateway host was restricted, and we requested to allow SMTP port outgoing to ANY ANY. Still not able to, so the additional port needed was... port 53 (DNS) TCP/UPD, allowed to any any. It works.&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/8149199646787141738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/8149199646787141738'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2020/10/smtp-issues-host-or-domain-name-not.html' title=''/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-129828035238940107</id><published>2020-10-19T10:20:00.002-07:00</published><updated>2020-12-17T08:49:08.508-08:00</updated><title type='text'>Resize root partition of RHEL/CentOS Azure VM</title><content type='html'>&lt;div&gt;Usually when provisioning VM, on azure spefically, or even on aws, default partition like on the root or / partition is very minimal. We have here a 2GB / partition that we need to increase.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Steps:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Stop or deallocate the VM&lt;/div&gt;&lt;div&gt;2. Go to Disk, then OS DIsk and change the value, usually its 30 GB devided by other partition, so if you need to make it 40GB, just add 38, so make the number 68&lt;/div&gt;&lt;div&gt;3. Save and start the VM&lt;/div&gt;&lt;div&gt;4. Login as root via ssh&lt;/div&gt;&lt;div&gt;5. vgdisplay. sample below.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;[root@valog02 ~]# vgdisplay&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; --- Volume group ---&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; VG Name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rootvg&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; System ID&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; Format&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lvm2&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; Metadata Areas&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; Metadata Sequence No&amp;nbsp; 7&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; VG Access&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;read/write&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; VG Status&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;resizable&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; MAX LV&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; Cur LV&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; Open LV&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; Max PV&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; Cur PV&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; Act PV&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; VG Size&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;63.02 GiB&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; PE Size&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4.00 MiB&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; Total PE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16132&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; Alloc PE / Size&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6400 / 25.00 GiB&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; Free&amp;nbsp; PE / Size&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9732 / &amp;lt;38.02 GiB&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; VG UUID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WhcyfU-IClc-LyI5-uSec-5aAL-lyBp-Orfbf0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Notice the&amp;nbsp; #Free&amp;nbsp; PE / Size&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9732 / &amp;lt;38.02 GiB#, so we have some 38GB free to use.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Current size is:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;/dev/mapper/rootvg-rootlv&amp;nbsp; &amp;nbsp;2.0G&amp;nbsp; &amp;nbsp;66M&amp;nbsp; 2.0G&amp;nbsp; &amp;nbsp;4% /&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;6. Now, extend it using lvextend. The LV part is &quot;/dev/mapper/rootvg-rootlv&quot;, so command would be below. I just made it 37GB instead, so outcome would be 39GB.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;lvextend -L +37G /dev/rootvg/rootlv&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Sample:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;[root@valog02 ~]# lvextend -L +37G /dev/rootvg/rootlv&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; Size of logical volume rootvg/rootlv changed from 2.00 GiB (512 extents) to 39.00 GiB (9984 extents).&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; Logical volume rootvg/rootlv successfully resized.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;7. Now that we have extended it, we will grow it online.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;xfs_growfs /dev/rootvg/rootlv&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;[root@valog02 ~]# xfs_growfs /dev/rootvg/rootlv&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;meta-data=/dev/mapper/rootvg-rootlv isize=512&amp;nbsp; &amp;nbsp; agcount=4, agsize=131072 blks&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sectsz=4096&amp;nbsp; attr=2, projid32bit=1&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;crc=1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; finobt=0 spinodes=0&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;data&amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bsize=4096&amp;nbsp; &amp;nbsp;blocks=524288, imaxpct=25&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sunit=0&amp;nbsp; &amp;nbsp; &amp;nbsp; swidth=0 blks&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;naming&amp;nbsp; &amp;nbsp;=version 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bsize=4096&amp;nbsp; &amp;nbsp;ascii-ci=0 ftype=1&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;log&amp;nbsp; &amp;nbsp; &amp;nbsp; =internal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bsize=4096&amp;nbsp; &amp;nbsp;blocks=2560, version=2&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sectsz=4096&amp;nbsp; sunit=1 blks, lazy-count=1&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;realtime =none&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;extsz=4096&amp;nbsp; &amp;nbsp;blocks=0, rtextents=0&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;data blocks changed from 524288 to 10223616&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;8. Check the size now.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; [root@valog02 ~]# df -h&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Filesystem&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Size&amp;nbsp; Used Avail Use% Mounted on&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;devtmpfs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;16G&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp;16G&amp;nbsp; &amp;nbsp;0% /dev&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;tmpfs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16G&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp;16G&amp;nbsp; &amp;nbsp;0% /dev/shm&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;tmpfs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16G&amp;nbsp; &amp;nbsp;34M&amp;nbsp; &amp;nbsp;16G&amp;nbsp; &amp;nbsp;1% /run&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;tmpfs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16G&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp;16G&amp;nbsp; &amp;nbsp;0% /sys/fs/cgroup&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;/dev/mapper/rootvg-rootlv&amp;nbsp; &amp;nbsp; 39G&amp;nbsp; &amp;nbsp;70M&amp;nbsp; &amp;nbsp;39G&amp;nbsp; &amp;nbsp;1% /&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;9. Try to reboot if none production yet.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;That&#39;s all, keep safe everyone.&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Adding this from azure site.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;https://docs.microsoft.com/en-us/azure/virtual-machines/linux/resize-os-disk-gpt-partition&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/129828035238940107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/129828035238940107'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2020/10/resize-root-partition-of-rhelcentos.html' title='Resize root partition of RHEL/CentOS Azure VM'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-7814119977518518893</id><published>2019-02-07T16:14:00.002-08:00</published><updated>2019-10-28T16:58:44.321-07:00</updated><title type='text'>ZIMBRA Search keyword across all mailbox servers and users on a list.</title><content type='html'>&lt;script data-ad-client=&quot;ca-pub-4492281709162322&quot; async src=&quot;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;

The task is to search certain keywords on each mailbox at zimbra, so on the current version, 8.x, we can use the command:&lt;br /&gt;
&lt;br /&gt;
zmmailbox -z -m username@zimbradomain.defined search &quot;Keyword To Search&quot;&lt;br /&gt;
&lt;br /&gt;
So below is actually a sample search result with a keyword &quot;I Love You&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;search &quot;I Love You&quot; on user1@domain.com &amp;gt;&amp;gt; this is not part of zimbra search output, its part of the script to check what search keyword used because the keyword may be part of the email body and the result display what is the subject of the email where you can find the Keyword.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;&amp;gt;&amp;gt;Output of search below&amp;lt;&amp;lt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;&lt;br /&gt;
num: 1, more: false&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Id&amp;nbsp;
Type&amp;nbsp;&amp;nbsp; From&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subject&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Date&lt;br /&gt;
&amp;nbsp;&amp;nbsp; ------&amp;nbsp;
----&amp;nbsp;&amp;nbsp; --------------------&amp;nbsp;
--------------------------------------------------&amp;nbsp; --------------&lt;br /&gt;
1. -21682&amp;nbsp; conv&amp;nbsp;&amp;nbsp; Internal&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; How can you do that?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/02/19
05:36&lt;br /&gt;
&lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt;
&lt;!--[endif]--&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;&amp;gt;&amp;gt;End of output&amp;lt;&amp;lt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;Going to search via command line, and&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12pt;&quot;&gt;I have 5 keywords to search and put it on a file at /home/user/keyword_file.txt&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;Keywords:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;I love you&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;Why do that&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;Darling&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;Home&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;I did not do it&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;And I have a set of users to search, let say I have 10 users and put it on a file.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;/home/user/userlist.txt&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;user1@domain.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;user2@domain.com and so on..&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;So below is a script that I have tried, as zimbra user and run it on one of the Mailstore.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
#Below is to turn off splitting of multiple word on one line, like &quot;I did not do it&quot;&lt;br /&gt;
IFS=$&#39;\n&#39;&lt;br /&gt;
&lt;br /&gt;
#If you want to check command execution&lt;br /&gt;
set -x&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 12.0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;for keyword in `cat&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 16px;&quot;&gt;/home/user/keyword_file.txt&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;do&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;for user in `cat&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;liberation serif&amp;quot; , serif; font-size: 16px;&quot;&gt;/home/user/userlist.txt&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;do&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;echo &quot;search $keyword on mailbox $user&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;zmmailbox -z -m $user search &quot;$keyword&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;done&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;done |tee -a /home/user/searchresult.txt&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;#End here&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;Just check on the searchresult.txt the results then.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;If userslist contains a hundred, you can invoke screen so you can detach and re attach later if you need to check or usually if you did it remotely, so to avoid network disconnect.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;liberation&amp;quot; serif , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/7814119977518518893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/7814119977518518893'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2019/02/zimbra-search-keyword-across-all.html' title='ZIMBRA Search keyword across all mailbox servers and users on a list.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-7550845833626261551</id><published>2018-03-07T20:54:00.001-08:00</published><updated>2018-03-07T20:54:20.267-08:00</updated><title type='text'>Sample haproxy config that proxying a https backend and setup as active passive.</title><content type='html'>&lt;br /&gt;
Sample haproxy config that proxying a https backend and setup as active passive.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;global
&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;# to have these messages end up in /var/log/haproxy.log you will
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;# need to:
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;#
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;# 1) configure syslog to accept network log events. &amp;nbsp;This is done
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;# &amp;nbsp;&amp;nbsp;&amp;nbsp;by adding the &#39;-r&#39; option to the SYSLOGD_OPTIONS in
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;# &amp;nbsp;&amp;nbsp;&amp;nbsp;/etc/sysconfig/syslog
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;#
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;# 2) configure local2 events to go to the /var/log/haproxy.log
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;# &amp;nbsp;&amp;nbsp;file. A line like the following can be added to
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;# &amp;nbsp;&amp;nbsp;/etc/sysconfig/syslog
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;#
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;# &amp;nbsp;&amp;nbsp;&amp;nbsp;local2.* &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/var/log/haproxy.log
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;#
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;log &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;127.0.0.1 local2
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;tune.ssl.default-dh-param 2048
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;chroot &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/var/lib/haproxy
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;pidfile &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/var/run/haproxy.pid
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;maxconn &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4000
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;user &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;haproxy
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;group &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;haproxy
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;daemon
&lt;br /&gt;
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;# turn on stats unix socket
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;stats socket /var/lib/haproxy/stats
&lt;br /&gt;
&lt;br /&gt;defaults
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;mode &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;http
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;log &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;global
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;option &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;httplog
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;option &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dontlognull
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;option http-server-close
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;option forwardfor &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;except 127.0.0.0/8
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;option &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;redispatch
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;retries &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;timeout http-request &amp;nbsp;&amp;nbsp;&amp;nbsp;10s
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;timeout queue &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1m
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;timeout connect &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;10s
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;timeout client &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1m
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;timeout server &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1m
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;timeout http-keep-alive 10s
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;timeout check &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;10s
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;maxconn &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3000
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;frontend SHINY_APP
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;bind 1.2.3.40:443 ssl crt /etc/ssl/mycert.pem force-tlsv12
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;reqadd X-Forwarded-Proto:\ https
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;default_backend SHINY_BACKEND_443
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;option httplog
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;log global &lt;br /&gt;
&lt;br /&gt;frontend WEB_API
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;bind 1.2.3.40:8443 ssl crt /etc/ssl/mycert.pem force-tlsv12
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;reqadd X-Forwarded-Proto:\ https
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;default_backend WEBAPI_BACKEND_8443
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;option httplog
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;log global
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;backend SHINY_BACKEND_443
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;balance &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;roundrobin
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;server &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MAIN_SHINY_WEB_1.2.3.41 1.2.3.41:443 weight 100 minconn 80 maxconn 180 inter 5s check ssl verify none
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;server &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;BACKUP_SHINY_WEB_1.2.3.42 1.2.3.42:443 weight 100 minconn 80 maxconn 180 inter 5s check ssl verify none backup
&lt;br /&gt;
&lt;br /&gt;backend WEBAPI_BACKEND_8443
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;balance &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;roundrobin
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;server &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MAIN_WEB_API_1.2.3.43 1.2.3.43:8443 weight 100 minconn 100 maxconn 200 inter 5s check ssl verify none
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;server &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;BACKUP_WEB_API_1.2.3.44 1.2.3.44:8443 weight 100 minconn 100 maxconn 200 inter 5s check ssl verify none backup
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;listen stats
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;bind 1.2.3.40:9999
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;stats enable
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;stats hide-version
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;stats uri /stats
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;stats show-desc Shiny Load Balancer Node&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;stats refresh 10s
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;stats auth admin:password #just change this to your preffered&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;stats scope SHINY_BACKEND_443
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;stats scope WEBAPI_BACKEND_8443
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;stats admin if TRUE
&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;stats show-legends&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;# The above is at Centos 7&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;# to configure the logging, need to edit the rsyslog.conf to accept connection either tcp or udp and set the local2.* to /var/log/haproxy.log, then restart the service.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;#The backup keyword at the backend is the setting for the backup role, while the primary is up, there should be none will be routed to the backup. See the documentation of haproxy for further explanation.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/7550845833626261551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/7550845833626261551'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2018/03/sample-haproxy-config-that-proxying.html' title='Sample haproxy config that proxying a https backend and setup as active passive.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-4150609259396927675</id><published>2018-02-11T18:56:00.003-08:00</published><updated>2018-02-11T18:56:24.841-08:00</updated><title type='text'>Installing commercial wildcard ssl cert on zimbra 8</title><content type='html'>Install Commercial SSL Cert at zimbra server (8.8) opensource&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Login as root&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;su - zimbra&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;This ssl cert is a wildcard certificate&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;copy csr key, commcercial.crt commercial-gd_bundle.crt to /tmp of the server&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;change owner or provide read access to the cert files for zimbra user&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;do a verify&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;cd /tmp &amp;gt;&amp;gt; this is where the files were uploaded&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;commercial.key - this is the csr or private key&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;company.com.crt - this is the ssl cert downloaded from ssl provide&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;company.com.gd_bundle.crt - the gd_bundle.crt file downloaded from ssl provider&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Verify first the certificates.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;u&gt;#command to verify&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;/opt/zimbra/bin/zmcertmgr verifycrt comm commercial.key company.com.crt company.com.gd_bundle.crt&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;copy /tmp/commercial.key to /opt/zimbra/ssl/zimbra/commercial/commercial.key&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;once all are ok, proceed with deployment&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;This server where this ssl now has been deployed was at a mailstore server, so you may see mailstore related services below.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;u&gt;#command to deploy&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;zmcertmgr deploycrt comm company.com.crt company.com.gd_bundle.crt&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;#output below&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Verifying &#39;company.com.crt&#39; against &#39;/opt/zimbra/ssl/zimbra/commercial/commercial.key&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Certificate &#39;company.com.crt&#39; and private key &#39;/opt/zimbra/ssl/zimbra/commercial/commercial.key&#39; match.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Verifying &#39;company.com.crt&#39; against &#39;company.com.gd_bundle.crt&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Valid certificate chain: company.com.crt: OK&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Copying &#39;company.com.crt&#39; to &#39;/opt/zimbra/ssl/zimbra/commercial/commercial.crt&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Copying &#39;company.com.gd_bundle.crt&#39; to &#39;/opt/zimbra/ssl/zimbra/commercial/commercial_ca.crt&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Appending ca chain &#39;company.com.gd_bundle.crt&#39; to &#39;/opt/zimbra/ssl/zimbra/commercial/commercial.crt&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Importing cert &#39;/opt/zimbra/ssl/zimbra/commercial/commercial_ca.crt&#39; as &#39;zcs-user-commercial_ca&#39; into cacerts &#39;/opt/zimbra/common/lib/jvm/java/jre/lib/security/cacerts&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** NOTE: restart mailboxd to use the imported certificate.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Installing imapd certificate &#39;/opt/zimbra/conf/imapd.crt&#39; and key &#39;/opt/zimbra/conf/imapd.key&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Copying &#39;/opt/zimbra/ssl/zimbra/commercial/commercial.crt&#39; to &#39;/opt/zimbra/conf/imapd.crt&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Copying &#39;/opt/zimbra/ssl/zimbra/commercial/commercial.key&#39; to &#39;/opt/zimbra/conf/imapd.key&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Creating file &#39;/opt/zimbra/ssl/zimbra/jetty.pkcs12&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Creating keystore &#39;/opt/zimbra/conf/imapd.keystore&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Installing ldap certificate &#39;/opt/zimbra/conf/slapd.crt&#39; and key &#39;/opt/zimbra/conf/slapd.key&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Copying &#39;/opt/zimbra/ssl/zimbra/commercial/commercial.crt&#39; to &#39;/opt/zimbra/conf/slapd.crt&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Copying &#39;/opt/zimbra/ssl/zimbra/commercial/commercial.key&#39; to &#39;/opt/zimbra/conf/slapd.key&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Creating file &#39;/opt/zimbra/ssl/zimbra/jetty.pkcs12&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Creating keystore &#39;/opt/zimbra/mailboxd/etc/keystore&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Installing mta certificate &#39;/opt/zimbra/conf/smtpd.crt&#39; and key &#39;/opt/zimbra/conf/smtpd.key&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Copying &#39;/opt/zimbra/ssl/zimbra/commercial/commercial.crt&#39; to &#39;/opt/zimbra/conf/smtpd.crt&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Copying &#39;/opt/zimbra/ssl/zimbra/commercial/commercial.key&#39; to &#39;/opt/zimbra/conf/smtpd.key&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Installing proxy certificate &#39;/opt/zimbra/conf/nginx.crt&#39; and key &#39;/opt/zimbra/conf/nginx.key&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Copying &#39;/opt/zimbra/ssl/zimbra/commercial/commercial.crt&#39; to &#39;/opt/zimbra/conf/nginx.crt&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Copying &#39;/opt/zimbra/ssl/zimbra/commercial/commercial.key&#39; to &#39;/opt/zimbra/conf/nginx.key&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** NOTE: restart services to use the new certificates.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Cleaning up 3 files from &#39;/opt/zimbra/conf/ca&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Removing /opt/zimbra/conf/ca/bea3f1c6.0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Removing /opt/zimbra/conf/ca/ca.key&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Removing /opt/zimbra/conf/ca/ca.pem&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Copying CA to /opt/zimbra/conf/ca&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Copying &#39;/opt/zimbra/ssl/zimbra/ca/ca.key&#39; to &#39;/opt/zimbra/conf/ca/ca.key&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Copying &#39;/opt/zimbra/ssl/zimbra/ca/ca.pem&#39; to &#39;/opt/zimbra/conf/ca/ca.pem&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Creating CA hash symlink &#39;bea3f1c6.0&#39; -&amp;gt; &#39;ca.pem&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Creating /opt/zimbra/conf/ca/commercial_ca_1.crt&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Creating CA hash symlink &#39;27eb7704.0&#39; -&amp;gt; &#39;commercial_ca_1.crt&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Creating /opt/zimbra/conf/ca/commercial_ca_2.crt&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Creating CA hash symlink &#39;cbf06781.0&#39; -&amp;gt; &#39;commercial_ca_2.crt&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Creating /opt/zimbra/conf/ca/commercial_ca_3.crt&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;** Creating CA hash symlink &#39;f081611a.0&#39; -&amp;gt; &#39;commercial_ca_3.crt&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;#Restart service. zmcontrol restart&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;You may then verify via web ui.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/4150609259396927675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/4150609259396927675'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2018/02/installing-commercial-wildcard-ssl-cert.html' title='Installing commercial wildcard ssl cert on zimbra 8'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-6638253635368300073</id><published>2018-01-31T16:37:00.005-08:00</published><updated>2018-01-31T16:37:30.630-08:00</updated><title type='text'>Could not open file &quot;pg_clog/0XXX&quot; </title><content type='html'>I need to vacuum full the database but got this error&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;mydb=# vacuum full;
&lt;/span&gt;&lt;br /&gt;ERROR: &amp;nbsp;could not access status of transaction 376865319
&lt;br /&gt;DETAIL: &amp;nbsp;Could not open file &quot;pg_clog/0167&quot;: No such file or directory.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;
Solution per searching google.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;-bash-3.2$ dd if=/dev/zero of=/pgsql/data/pg_clog/0167 bs=256k count=1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Then VACCUM FULL again.&lt;/span&gt;&lt;/span&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/6638253635368300073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/6638253635368300073'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2018/01/could-not-open-file-pgclog0xxx.html' title='Could not open file &quot;pg_clog/0XXX&quot; '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-2795766367428466598</id><published>2018-01-28T21:26:00.001-08:00</published><updated>2018-01-31T16:37:51.582-08:00</updated><title type='text'>Fixing iscsi connectivity issue between Centos 6 and Compellent Storage</title><content type='html'>Fixing iscsi connectivity issue between Centos 6 and Compellent Storage&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I boot a Centos 6 server so it can be mounted with a volume from compellent, but got this issue that the HBA interface cannot be detected at the compellent side but check the connectivity, it able to established connection to iscsi target.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I manually connect the host to the compellent server iscsi ip, so below, I have 8 IP to connect&lt;br /&gt;
&lt;br /&gt;
#connecting&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;for i in 1 2 3 4 5 6 7 8; do iscsiadm --mode discoverydb --type sendtargets --portal 1.2.3.$i --discover; done&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
#logging in&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace;&quot;&gt;iscsiadm -m node -l&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
#connecting&lt;br /&gt;
But i encountered at the compellent an issue where the existing initiator name does not show, so I cannot bind the volume to that said host at compellent.&lt;br /&gt;
&lt;br /&gt;
The fix is to rename the initiator name. Use the command&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;/sbin/iscsi-iname&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above will generate a new name and then put it at /etc/iscsi/initiatorname.iscsi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have an existing&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: monospace;&quot;&gt;InitiatorName=iqn.1994-05.com.redhat:fc5b3050bf&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
and that name either defined on different IP, you may replace that with the new name and restart iscsi service.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Then check at compellent the hba for the host IP equivalent, it should display the new name and the IP and you can now map the volume to the said server.&amp;nbsp;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/2795766367428466598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/2795766367428466598'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2018/01/fixing-iscsi-connectivity-issue-between.html' title='Fixing iscsi connectivity issue between Centos 6 and Compellent Storage'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-3939256136603287236</id><published>2018-01-02T22:44:00.003-08:00</published><updated>2018-01-16T16:36:10.036-08:00</updated><title type='text'>sftp chroot environment - config and script</title><content type='html'>sftp chroot environment&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Of course, sshd service should be enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sample Config:&lt;br /&gt;
&lt;br /&gt;
#/etc/ssh/sshd_config&lt;br /&gt;
#&lt;br /&gt;
Protocol 2&lt;br /&gt;
SyslogFacility AUTHPRIV&lt;br /&gt;
MaxAuthTries 5&lt;br /&gt;
PubkeyAuthentication yes&lt;br /&gt;
PasswordAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
GSSAPIAuthentication yes&lt;br /&gt;
GSSAPICleanupCredentials yes&lt;br /&gt;
UsePAM yes&lt;br /&gt;
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES&lt;br /&gt;
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT&lt;br /&gt;
AcceptEnv LC_IDENTIFICATION LC_ALL&lt;br /&gt;
X11Forwarding yes&lt;br /&gt;
Ciphers aes128-ctr,aes192-ctr,aes256-ctr&lt;br /&gt;
MACs hmac-sha1,hmac-ripemd160&lt;br /&gt;
Subsystem&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sftp&amp;nbsp; &amp;nbsp; internal-sftp&lt;br /&gt;
&lt;br /&gt;
Match Group sftpusers&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ChrootDirectory /home/sftpusers/%u&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ForceCommand internal-sftp&lt;br /&gt;
###EOF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sample sftp adduser script&lt;br /&gt;
&lt;br /&gt;
#/usr/local/sbin/sftp_adduser.sh&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
if [ $# -lt 1 ]; then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;Usage: `basename $0`&quot; sftp username&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;&amp;nbsp; &amp;nbsp;eg. `basename $0` &quot;sftp_something&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exit 1&lt;br /&gt;
fi&lt;br /&gt;
RANPASS=`date +%s | sha256sum | base64 | head -c 8 ; echo`&lt;br /&gt;
USERNAME=$1&lt;br /&gt;
SFTPHOME=/home/sftpusers&lt;br /&gt;
SFTPSHELL=/usr/libexec/openssh/sftp-server&lt;br /&gt;
&lt;br /&gt;
id $USERNAME 2&amp;gt; /dev/null 1&amp;gt;&amp;nbsp; /dev/null&lt;br /&gt;
if [ $? -eq 0 ]&lt;br /&gt;
then&lt;br /&gt;
echo &quot;$1 already exist, please try again using another name&quot;&lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; useradd -d $SFTPHOME/$USERNAME -s $SFTPSHELL -p $RANPASS $USERNAME&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo $RANPASS &amp;gt; /tmp/passwd.tmp001&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sleep 1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; passwd --stdin &amp;lt; /tmp/passwd.tmp001 $USERNAME&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo $USERNAME &amp;gt;&amp;gt; /etc/listfile/sshusers&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #set permission&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; usermod -g sftpusers $USERNAME&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; usermod -G sftpusers $USERNAME&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #This is the default folder for sftp users&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mkdir $SFTPHOME/$USERNAME/FILES&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #set permissions&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chown root $SFTPHOME/$USERNAME&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chmod go-w $SFTPHOME/$USERNAME&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chown $USERNAME:sftpusers $SFTPHOME/$USERNAME/FILES&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chmod u+rwX $SFTPHOME/$USERNAME&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chmod 755 $SFTPHOME/$USERNAME&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chmod g+rx $SFTPHOME/$USERNAME&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #Details&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo USER CREATED: $USERNAME&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo USER DEFINED PASSWORD: $RANPASS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo FTP INTERNAL IP: 1.2.3.4&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo FTP EXTERNAL IP: 111.222.112.221&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo USER: $USERNAME has been created at ftp 1.2.3.4 | mail -s &quot;created at sftp 1.2.3.4 on `date`&quot; admin@myhost.com&lt;br /&gt;
fi</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/3939256136603287236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/3939256136603287236'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2018/01/sftp-chroot-environment-config-and.html' title='sftp chroot environment - config and script'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-1521175844617360467</id><published>2017-05-18T19:34:00.002-07:00</published><updated>2017-05-18T19:34:31.636-07:00</updated><title type='text'>haproxy sample config used on actual setup</title><content type='html'>&lt;br /&gt;
OS : Centos 6.8&lt;br /&gt;
Real Servers are CentOS 5.11&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
# Example configuration for a possible web application. &amp;nbsp;See the&lt;br /&gt;
# full configuration options online.&lt;br /&gt;
#&lt;br /&gt;
# &amp;nbsp; http://haproxy.1wt.eu/download/1.4/doc/configuration.txt&lt;br /&gt;
#&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
# Global settings&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
global&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #&lt;br /&gt;
&amp;nbsp; &amp;nbsp; log &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 127.0.0.1 local2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; chroot &amp;nbsp; &amp;nbsp; &amp;nbsp;/var/lib/haproxy&lt;br /&gt;
&amp;nbsp; &amp;nbsp; pidfile &amp;nbsp; &amp;nbsp; /var/run/haproxy.pid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; maxconn &amp;nbsp; &amp;nbsp; 600 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; user &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;haproxy &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; group &amp;nbsp; &amp;nbsp; &amp;nbsp; haproxy &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; daemon &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; # turn on stats unix socket &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stats socket /var/lib/haproxy/stats &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tune.ssl.default-dh-param 2048 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
#--------------------------------------------------------------------- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # common defaults that all the &#39;listen&#39; and &#39;backend&#39; sections will &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # use if not designated in their block &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
#--------------------------------------------------------------------- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
defaults &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;mode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;http &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;log &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; global &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;option tcplog &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;option &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dontlognull &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;option forwardfor &amp;nbsp; &amp;nbsp; &amp;nbsp; except 127.0.0.0/8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; option http-server-close &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; option abortonclose &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; option &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;redispatch &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; retries &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; ####&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeout http-request &amp;nbsp; &amp;nbsp;60s&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeout queue &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 60m&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeout connect &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 300s #s&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeout client &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;60m&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeout server &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;60m&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeout http-keep-alive 5s&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeout check &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10s&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #tune.ssl.default-dh-param 2048&lt;br /&gt;
&lt;br /&gt;
frontend WEBAPPS_HTTP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bind 10.1.1.12:80&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reqadd X-Forwarded-Proto:\ http&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default_backend WEBAPPS_Backend&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
frontend WEBAPPS_HTTPS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bind 10.1.1.12:443 ssl crt /etc/ssl/webapps.pem force-tlsv12&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reqadd X-Forwarded-Proto:\ https&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default_backend WEBAPPS_Backend&lt;br /&gt;
&lt;br /&gt;
backend WEBAPPS_Backend&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; balance roundrobin&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stick-table type ip size 1m expire 1h&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stick on src&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; option abortonclose&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; option forwardfor except 127.0.0.0/8&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; option http-server-close&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; option httpchk HEAD /check.html HTTP/1.0&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; server WEB_10.1.1.13 10.1.1.13:80 weight 20 minconn 80 maxconn 180 inter 5s check&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; server WEB_10.1.1.14 10.1.1.14:80 weight 20 minconn 80 maxconn 180 inter 5s check&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; server WEB_10.1.1.16 10.1.1.16:80 weight 20 minconn 80 maxconn 160 inter 5s check&lt;br /&gt;
&lt;br /&gt;
listen &amp;nbsp;stats 10.1.1.12:8443&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;http&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; global&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; maxconn 10&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeout client &amp;nbsp; &amp;nbsp; 100s&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeout server &amp;nbsp; &amp;nbsp; 100s&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeout connect &amp;nbsp; &amp;nbsp;100s&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeout queue &amp;nbsp; 100s&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stats enable&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stats hide-version&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stats refresh 10s&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stats show-node&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stats scope WEBAPPS_Backend&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stats auth hauser:Passworditsuptoyou&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stats uri /stats&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stats admin if TRUE&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/1521175844617360467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/1521175844617360467'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2017/05/haproxy-sample-config-used-on-actual.html' title='haproxy sample config used on actual setup'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-8856567692783479267</id><published>2017-04-27T17:43:00.003-07:00</published><updated>2017-04-27T17:43:17.065-07:00</updated><title type='text'>could not create unique index &quot;pg_statistic_relid_att_inh_index&quot; on postgresql 9.3 - FIXED</title><content type='html'>I have a newly restored database via symantec backup but got a problem.&lt;br /&gt;&lt;br /&gt;Scenario:&lt;br /&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li dir=&quot;ltr&quot;&gt;Postgresql version: 9.3 - Centos&lt;/li&gt;
&lt;li dir=&quot;ltr&quot;&gt;Able to access the database, via command line and pgadmin4 only, pgadmin 3 does not work.&lt;/li&gt;
&lt;li dir=&quot;ltr&quot;&gt;When creating any table, I cannot create, it will not proceed.&lt;/li&gt;
&lt;li dir=&quot;ltr&quot;&gt;When doing command reindex system DBNAME, i  am stuck with the error below.&lt;br /&gt;&lt;br /&gt;DBNAME=# reindex system DBNAME;&lt;br /&gt;NOTICE:  table &quot;pg_catalog.pg_class&quot; was reindexed&lt;br /&gt;ERROR:  could not create unique index &quot;pg_statistic_relid_att_inh_index&quot;&lt;br /&gt;DETAIL:  Key (starelid, staattnum, stainherit)=(2610, 15, f) is duplicated.&lt;br /&gt;&lt;br /&gt;LOG:&lt;br /&gt;Apr 26 14:50:44 stationname postgres[5452]: [10-2] 2017-04-26 14:50:44 PHT postgres DBNAME 127.0.0.1 DETAIL:  Key (starelid, staattnum, stainherit)=(2610, 15, f) is duplicated.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; Got a tip from one blog I found to check if there were really a duplicate by sql command below: (link of blog: &lt;a href=&quot;http://www.pateldenish.com/2016/09/recovering-corrupted-postgres-database.html)&quot; style=&quot;color: #3465a4;&quot;&gt;http://www.pateldenish.com/2016/09/recovering-corrupted-postgres-database.html)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;select starelid, staattnum, stainherit from pg_catalog.pg_statistic where starelid=2610 order by 2;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DBNAME=# select starelid, staattnum, stainherit from pg_catalog.pg_statistic where starelid=2610 order by 2;&lt;br /&gt; starelid | staattnum | stainherit &lt;br /&gt;----------+-----------+------------&lt;br /&gt;     2610 |         1 | f&lt;br /&gt;     2610 |         2 | f&lt;br /&gt;     2610 |         3 | f&lt;br /&gt;     2610 |         4 | f&lt;br /&gt;     2610 |         5 | f&lt;br /&gt;     2610 |         6 | f&lt;br /&gt;     2610 |         7 | f&lt;br /&gt;     2610 |         8 | f&lt;br /&gt;     2610 |         9 | f&lt;br /&gt;     2610 |        10 | f&lt;br /&gt;     2610 |        11 | f&lt;br /&gt;     2610 |        12 | f&lt;br /&gt;     2610 |        13 | f&lt;br /&gt;     2610 |        14 | f&lt;br /&gt;     2610 |        15 | f&lt;br /&gt;     2610 |        16 | f&lt;br /&gt;     2610 |        17 | f&lt;br /&gt;     2610 |        18 | f&lt;br /&gt;(18 rows)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;but there wee no duplicates found.&lt;br /&gt;&lt;br /&gt;So since I dont have a choice because I cannot seem to create any additional table, then I may need to restore another one from backup, and since I still have a running backup, so before doing another restore, I tried deleting the reported duplicate by command below:&lt;br /&gt;&lt;br /&gt;DBNAME=# delete from pg_catalog.pg_statistic where starelid=2610 and staattnum=15;&lt;br /&gt;DELETE 1&lt;br /&gt;&lt;br /&gt;DBNAME=# reindex database DBNAME;&lt;br /&gt;NOTICE:  table &quot;pg_catalog.pg_class&quot; was reindexed&lt;br /&gt;ERROR:  could not create unique index &quot;pg_statistic_relid_att_inh_index&quot;&lt;br /&gt;DETAIL:  Key (starelid, staattnum, stainherit)=(2610, 13, f) is duplicated.&lt;br /&gt;&lt;br /&gt;DBNAME=# delete from pg_catalog.pg_statistic where starelid=2610 and staattnum=13;&lt;br /&gt;DELETE 1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After the last deletion of duplicate, I able to reindex system and reindex database and seems those indexes were recreated and my issue on creating any table was fixed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/8856567692783479267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/8856567692783479267'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2017/04/could-not-create-unique-index.html' title='could not create unique index &quot;pg_statistic_relid_att_inh_index&quot; on postgresql 9.3 - FIXED'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-6581455860027306663</id><published>2017-04-25T19:50:00.001-07:00</published><updated>2017-04-25T19:50:31.512-07:00</updated><title type='text'>Small bash script to create or reset nginx reverse proxy protected password</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a file /etc/nginx/listofuser&lt;br /&gt;
&lt;br /&gt;
say it contains username&lt;br /&gt;
&lt;br /&gt;
user1&lt;br /&gt;
user2&lt;br /&gt;
user3&lt;br /&gt;
&lt;br /&gt;
Then, create a hidden file /etc/nginx/.users&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a bash script and put it at cron, say daily so once run, it will reset the proxy password to daily and email the result to users on the list with CC on admin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##############################################################################&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
for USERNAME in `cat /etc/nginx/listofusers`&lt;br /&gt;
do&lt;br /&gt;
#Random Pass generation using openssl&lt;br /&gt;
RANPASS=`openssl rand -base64 32 | sha256sum | base64 | head -c 8 ; echo`&lt;br /&gt;
&lt;br /&gt;
#htpasswd command&lt;br /&gt;
/usr/bin/htpasswd -b /etc/nginx/.users $USERNAME $RANPASS&lt;br /&gt;
&lt;br /&gt;
#email the results to users&lt;br /&gt;
echo -e &quot;USER: $USERNAME \nPASSWORD: $RANPASS \n \nPlease login at https://myproxy.example.com \n \nNote: Please expect email notification that it has been changed at the end of the day&quot; | mail -s &quot;password changed at myproxy on `date`&quot; -r noreply@example.com $USERNAME@example.com,admin@example.com&lt;br /&gt;
&lt;br /&gt;
done&lt;br /&gt;
###############################################################################&lt;br /&gt;
&lt;br /&gt;
or if you want to load it at command line only and output the user and pass and check the file &amp;nbsp;/etc/nginx/.users, see below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
for USERNAME in `cat /etc/nginx/listofusers`&lt;br /&gt;
do&lt;br /&gt;
&lt;br /&gt;
#Random pass generation using openssl (found it by googling)&lt;br /&gt;
RANPASS=`openssl rand -base64 32 | sha256sum | base64 | head -c 8 ; echo`&lt;br /&gt;
&lt;br /&gt;
#htpasswd command&lt;br /&gt;
/usr/bin/htpasswd -b /etc/nginx/.users $USERNAME $RANPASS&lt;br /&gt;
&lt;br /&gt;
#display the output after execution&lt;br /&gt;
echo &quot;USER: $USERNAME&quot;&lt;br /&gt;
echo &quot;PASSWORD: $RANPASS&quot;&lt;br /&gt;
&lt;br /&gt;
done&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
[root@localhost ~]# /usr/local/bin/test.sh&lt;br /&gt;
Updating password for user user1&lt;br /&gt;
USER: user1&lt;br /&gt;
PASSWORD: ZTkxMTQ0&lt;br /&gt;
Updating password for user user2&lt;br /&gt;
USER: user2&lt;br /&gt;
PASSWORD: ZDc4MTMz&lt;br /&gt;
Updating password for user user3&lt;br /&gt;
USER: user3&lt;br /&gt;
PASSWORD: NTIwOGUx&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Below are encrypted password file per htpasswd default encryption (CRYPT)&lt;br /&gt;
&lt;br /&gt;
[root@localhost ~]# cat /etc/nginx/.users&lt;br /&gt;
user1:$apr1$HJ7/Q/qG$UTO3KujLj3rkANcNpHked1&lt;br /&gt;
user2:$apr1$uk59ZMD4$c4zjvMXarVK9zI7nKthz60&lt;br /&gt;
user3:$apr1$iIOsYmbh$GdKdkMjwfi4VEHfwTnER60&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is the portion where you will set on your nginx config under location parameter&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; auth_basic &quot;Protected&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; auth_basic_user_file /etc/nginx/.users;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/6581455860027306663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/6581455860027306663'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2017/04/small-bash-script-to-create-or-reset.html' title='Small bash script to create or reset nginx reverse proxy protected password'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-5062639554327684595</id><published>2017-03-05T21:38:00.002-08:00</published><updated>2017-03-05T21:38:09.854-08:00</updated><title type='text'>How to import multiple filters of a zimbra users.</title><content type='html'>To extract the filter of a single user at zimbra cli.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
User the command below: example user is testsharedmbox@example.com&lt;br /&gt;
as zimbra user at cli, execute:&lt;br /&gt;
&lt;br /&gt;
zmprov ga testsharedmbox@example.com zimbraMailSieveScript&lt;br /&gt;
&lt;br /&gt;
Output below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# name testsharedmbox@example.com&lt;br /&gt;
zimbraMailSieveScript&lt;span style=&quot;color: red;&quot;&gt;: &lt;/span&gt;require [&quot;fileinto&quot;, &quot;reject&quot;, &quot;tag&quot;, &quot;flag&quot;];&lt;br /&gt;
&lt;br /&gt;
# Redirect&lt;br /&gt;
if anyof (header :matches [&quot;subject&quot;] &quot;*&quot;) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; redirect &quot;user1@yahoo.com&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; redirect &quot;user2@gmail.com&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; redirect &quot;user3@linux.com&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; keep;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; stop;&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So just imagine if you have 1000 redirect, so just use a little bash. Convert the above output to become like below as bash executable.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
####&lt;/div&gt;
&lt;div&gt;
zmprov ma testsharedmbox@example.com zimbraMailSieveScript&lt;span style=&quot;color: red;&quot;&gt; &#39;&lt;/span&gt;require [&quot;fileinto&quot;, &quot;reject&quot;, &quot;tag&quot;, &quot;flag&quot;];&lt;br /&gt;
&lt;br /&gt;
# Redirect&lt;br /&gt;
if anyof (header :matches [&quot;subject&quot;] &quot;*&quot;) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; redirect &quot;user1@yahoo.com&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; redirect &quot;user2@gmail.com&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; redirect &quot;user3@linux.com&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; keep;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; stop;&lt;br /&gt;
}&lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
####&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/5062639554327684595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/5062639554327684595'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2017/03/how-to-import-multiple-filters-of.html' title='How to import multiple filters of a zimbra users.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-7955789767105164961</id><published>2016-06-24T03:07:00.003-07:00</published><updated>2016-06-24T03:07:45.848-07:00</updated><title type='text'>Tunnel RDP via ssh</title><content type='html'>I have a ssh server serve as proxy and i want to tunnel the rdp on it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SSH Server (example only)&lt;br /&gt;
Public: 11.11.22.22&lt;br /&gt;
Internal: 10.10.1.1&lt;br /&gt;
&lt;br /&gt;
Windows server that I need to RDP via SSH Server&lt;br /&gt;
Internal IP: 10.10.1.2&lt;br /&gt;
&lt;br /&gt;
IP of my workstation:&lt;br /&gt;
Public: 9.9.9.9 (example only)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So I am going to ssh with below parameters:&lt;br /&gt;
&lt;br /&gt;
ssh -L 12389:10.10.1.2:3389 user@11.11.22.22&lt;br /&gt;
&lt;br /&gt;
Once connected, I can now RDP to 127.0.0.1:12389&lt;br /&gt;
&lt;br /&gt;
So as long as you are connected to 11.11.22.22, RDP is tunneled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/7955789767105164961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/7955789767105164961'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2016/06/tunnel-rdp-via-ssh.html' title='Tunnel RDP via ssh'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-1655809969396372097</id><published>2016-02-29T00:38:00.002-08:00</published><updated>2016-02-29T00:38:53.189-08:00</updated><title type='text'>Enabling Transparent Data Encryption on Postgresql 9.3</title><content type='html'>Well, this is actually copied from this link.&lt;br /&gt;
&lt;br /&gt;
https://translate.google.com/translate?sl=auto&amp;amp;tl=en&amp;amp;js=y&amp;amp;prev=_t&amp;amp;hl=en&amp;amp;ie=UTF-8&amp;amp;u=http%3A%2F%2Fpgsqldeepdive.blogspot.com%2F2015%2F06%2Fpostgresql-nec-tde.html&amp;amp;edit-text=&amp;amp;act=url&lt;br /&gt;
&lt;br /&gt;
But then, below are my steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Specs: Current posstgresql server is 9.3.10&lt;br /&gt;
&lt;br /&gt;
yum install --enablerepo=pgdg93 postgresql93-devel gmake make gcc gcc-c++ postgresql93-test yum-utils rpm-build bison flex perl-ExtUtils-Embed &quot;perl(ExtUtils::MakeMaker)&quot; python-devel tcl-devel readline-devel zlib-devel openssl-devel krb5-devel e2fsprogs-devel gettext libxml2-devel libxslt-devel pam-devel uuid-devel openldap-devel openjade opensp docbook-dtds docbook-style-dsssl rpm-build git&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It will update the current postgres-9.3 so be sure you have a backup of you current database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cd /root&lt;br /&gt;mkdir src&lt;br /&gt;cd src&lt;br /&gt;yumdownloader --source postgresql93&lt;br /&gt;rpm -ivh postgresql93-9.3.11-1PGDG.rhel6.src.rpm &lt;br /&gt;cd /root/rpmbuild&lt;br /&gt;rpmbuild -bp SPECS/postgresql-9.3.spec&lt;br /&gt;
&lt;br /&gt;mkdir /usr/local/src/&lt;br /&gt;cd /usr/local/src/&lt;br /&gt;git clone https://github.com/nec-postgres/tdeforpg.git&lt;br /&gt;ll /root/rpmbuild/BUILD/postgresql-9.3.11/&lt;br /&gt;export PGSRC=/root/rpmbuild/BUILD/postgresql-9.3.11/&lt;br /&gt;export PGHOME=/usr/pgsql-9.3&lt;br /&gt;export TDEHOME=/usr/local/src/tdeforpg&lt;br /&gt;export PATH=/usr/pgsql-9.3/bin/:$PATH&lt;br /&gt;&lt;br /&gt;
ln -s /usr/pgsql-9.3/lib/pgcrypto.so /usr/lib64/libpgcrypto.so&lt;br /&gt;&lt;br /&gt;
cd $PGSRC&lt;br /&gt;./configure&lt;br /&gt;&lt;br /&gt;
cd /usr/local/src/tdeforpg/SOURCES/data_encryption/&lt;br /&gt;&lt;br /&gt;
ln -s /root/rpmbuild/BUILD/postgresql-9.3.11/src/backend/utils/errcodes.h /root/rpmbuild/BUILD/postgresql-9.3.11/src/include/utils/errcodes.h&lt;br /&gt;&lt;br /&gt;
sh makedencryption.sh 93 $PGSRC&lt;br /&gt;&lt;br /&gt;
ln -s /usr/local/src/tdeforpg/SOURCES/data_encryption/93/data_encryption93.so.1.1.1.1 /usr/lib64/data_encryption.so&lt;br /&gt;chown postgres:postgres -R -v /usr/local/src/tdeforpg&lt;br /&gt;
&lt;br /&gt;
Apped the below line at current postgresql.conf&lt;br /&gt;
&lt;br /&gt;
shared_preload_libraries=&#39;/usr/lib64/data_encryption.so&#39;&lt;br /&gt;encrypt.enable = on&lt;br /&gt;
&lt;br /&gt;
Then connect to the database that you want the encryption to be enabled.&lt;br /&gt;
&lt;br /&gt;
as super user.&lt;br /&gt;
&lt;br /&gt;
psql -U pgadminuser -h 127.0.0.1 mycompanydb&lt;br /&gt;
&lt;br /&gt;
then execute&lt;br /&gt;
&lt;br /&gt;
create extension pgcrypto;&lt;br /&gt;
&lt;br /&gt;
then exit.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow the ff:&lt;br /&gt;
&lt;br /&gt;
cd $TDEHOME/SOURCES&lt;br /&gt;sh bin/cipher_setup.sh $PGHOME&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Transparent data encryption feature setup script&lt;br /&gt;Please select from the setup menu below&lt;br /&gt;Transparent data encryption feature setup menu&lt;br /&gt;1: activate&amp;nbsp; the transparent data encryption feature&lt;br /&gt;2: inactivate the transparent data encryption feature&lt;br /&gt;select menu [1 - 2] &amp;gt; 1&lt;br /&gt;Please enter database server port to connect : 5432&lt;br /&gt;Please enter database user name to connect : pgadminuser&lt;br /&gt;Please enter password for authentication : &lt;br /&gt;Please enter database name to connect : mycompanydb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;CREATE LANGUAGE&lt;br /&gt;INFO: Transparent data encryption feature has been activated&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cd $TDEHOME/SOURCES&lt;br /&gt;
sh bin/cipher_key_regist.sh /usr/pgsql-9.3&lt;br /&gt;=== Database connection information ===&lt;br /&gt;Please enter database server port to connect : 5432&lt;br /&gt;Please enter database user name to connect : pgadminuser&lt;br /&gt;Please enter password for authentication : &lt;br /&gt;Please enter database name to connect : mycompanydb&lt;br /&gt;=== Regist new cipher key ===&lt;br /&gt;Please enter the new cipher key :&amp;nbsp; &quot;make sure you remember this&quot;&lt;br /&gt;Please retype the new cipher key : &lt;br /&gt;Please enter the algorithm for new cipher key : aes&lt;br /&gt;&lt;br /&gt;Are you sure to register new cipher key(y/n) : y&lt;br /&gt;
&lt;br /&gt;
Try to check cipherkey table&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[root@MyServer SOURCES]# psql -U pgadminuser -h 127.0.0.1 mycompanydb&lt;br /&gt;Password for user pgadminuser: &lt;br /&gt;psql (9.3.11)&lt;br /&gt;Type &quot;help&quot; for help.&lt;br /&gt;&lt;br /&gt;mycompanydb=# select * from cipher_key_table;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; key&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | algorithm &lt;br /&gt;-------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;-----------------------------------------+-----------&lt;br /&gt;&amp;nbsp;\xc38f3e4f1305863e66e2ac3e4eaffe7617e09c7c6f8f3e4f1305863e66e&lt;br /&gt;
2ac3e4eaffe7617e09c7c6f8f3e4f1305863e66e2ac3e4eaffe7617e&lt;br /&gt;
09c7c6f8f3e4f1305863e66e2ac3e4eaffe7617e09c7c6f&lt;br /&gt;
&lt;br /&gt;7dacc2290d1ce491c620e0b43702a1f8509656c6 | aes&lt;br /&gt;(1 row)&lt;br /&gt;&lt;br /&gt;mycompanydb=# &lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then developers will be the one to continue.&lt;br /&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/1655809969396372097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/1655809969396372097'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2016/02/enabling-transparent-data-encryption-on.html' title='Enabling Transparent Data Encryption on Postgresql 9.3'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-4024548879229131504</id><published>2015-11-15T21:59:00.006-08:00</published><updated>2015-11-15T21:59:39.742-08:00</updated><title type='text'>Deleting a message per subject via CLI on zimbra</title><content type='html'>&lt;b&gt;Deleting a message per subject via CLI on zimbra&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The scenario:&lt;br /&gt;&lt;br /&gt;You want to delete a message that has been accidentally sent to a bunch of zimbra users and you need to delete those message with out accessing the mailbox of those who received one by one on the web. So you might be ending doing it on a CLI mode.&lt;br /&gt;&lt;br /&gt;Assuming that you able to open one of the message that you need to delete. If you view the full headers, you will find that it contain inside the header a msgid:&lt;br /&gt;&lt;br /&gt;sample:&lt;br /&gt;&lt;br /&gt;msgid:609947668.476624.1447370486564.JavaMail.zimbra@my.company.com&lt;br /&gt;&lt;br /&gt;Assuming the the senders zimbra domain is my.company.company&lt;br /&gt;&lt;br /&gt;the contents of the message ID is common to all that received the common message. &lt;br /&gt;&lt;br /&gt;assuming that you have a list file at /tmp/userlists.txt containing&lt;br /&gt;&lt;br /&gt;user1@my.company.com&lt;br /&gt;user2@my.company.com&lt;br /&gt;user3@my.company.com&lt;br /&gt;user4@my.company.com&lt;br /&gt;user5@my.company.com&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I used this command to generate first the user with message ID for deletion. Make sure to run this under zimbra user.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;for i in `cat /tmp/userlists.txt`; do echo $i,`zmmailbox -z -m $i s -t message -l 1 &quot;msgid:609947668.476624.1447370486564.JavaMail.zimbra@my.company.com&quot; |grep mess |awk &#39;{print $2,$3,$4,$5}&#39;`; done |tee -a /tmp/outputlist.txt&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I pipe the output at /tmp/outputlist.txt&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sample output that will fill the file is below:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;user1@my.company.com,57 mess Userx MYSPAM:&lt;br /&gt;user2@my.company.com,1705 mess Userx MYSPAM:&lt;br /&gt;user3@my.company.com,505 mess Userx MYSPAM:&lt;br /&gt;user4@my.company.com,4705 mess Userx MYSPAM:&lt;br /&gt;user5@my.company.com,9715 mess Userx MYSPAM:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Numbers are the MSG ID&lt;br /&gt;UserX is the sender&lt;br /&gt;MYSPAM is the Subject.&lt;br /&gt;&lt;br /&gt;I intended to do it to display the Sender and Subject so to double check that the message ID is the exact ID i need to delete.&lt;br /&gt;&lt;br /&gt;The awk part is the one that will display the tab needed.&lt;br /&gt;&lt;br /&gt;Now, I need to generate the email and the message ID.&lt;br /&gt;&lt;br /&gt;cat /tmp/outputlist.txt |awk &#39;{priont $1}&#39; &amp;gt; /tmp/fordeletelist.txt&lt;br /&gt;&lt;br /&gt;Outbut is now a csv.&lt;br /&gt;&lt;br /&gt;user1@my.company.com,57&lt;br /&gt;user2@my.company.com,1705&lt;br /&gt;user3@my.company.com,505&lt;br /&gt;user4@my.company.com,4705&lt;br /&gt;user5@my.company.com,9715&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then use bash IFS for the little script.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;while IFS=, read USER ID; do echo deleting message id $ID from $USER; zmmailbox -z -m $USER dm $ID; done &amp;lt; /tmp/fordeletelist.txt&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;It will search the user and the message ID which is the number on the file and will delete it. If you have a thousand to delete, it will be helpfull.&lt;br /&gt;&lt;br /&gt;By the way, google and there are also scripts provided already, just modified it for my need.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/4024548879229131504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/4024548879229131504'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2015/11/deleting-message-per-subject-via-cli-on.html' title='Deleting a message per subject via CLI on zimbra'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-2149681912183876316</id><published>2015-11-04T22:45:00.004-08:00</published><updated>2015-11-04T22:45:55.138-08:00</updated><title type='text'>Joining CentOS and authenticate to ACtive Directory using winbind</title><content type='html'>Joining CentOS and authenticate to ACtive Directory using winbind&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Make sure that you have a working DNS that can resolve the domain you are going to join and authenticate the CentOS server. Check /etc/resolv.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install the ff:&lt;br /&gt;
yum install authconfig krb5-workstation pam_krb5 samba-common&lt;br /&gt;
&lt;br /&gt;
Execute the command:&lt;br /&gt;
&lt;br /&gt;
Assuming the domain is MYCOMPANY.COM &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;authconfig --disablecache --enablewinbind --enablewinbindauth --smbsecurity=ads --smbworkgroup=MYCOMPANY --smbrealm=MYCOMPANY.COM --enablewinbindusedefaultdomain --enablekrb5 --krb5realm=MYCOMPANY.COM --enablekrb5kdcdns --enablekrb5realmdns --enablelocauthorize --enablepamaccess --smbidmapuid=16777216-16777300 --krb5kdc=srv001.mycompany.com --krb5adminserver=srv001.mycompany.com --winbindtemplateshell=/bin/bash --updateall&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The command above will change the /etc/samba/smb.conf and /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Once done on the authconfig command, issue the command below:&lt;br /&gt;
&lt;br /&gt;
kinit admin.user@MYCOMPANY.COM #This will ask for your password that you use on your AD domain to login, and will tell you if the server was joined successfully.&lt;br /&gt;
&lt;br /&gt;
Once accepted, you may join to domain.&lt;br /&gt;
&lt;br /&gt;
net join -w MYCOMPANY.COM -U admin.user #Again will ask for a password.&lt;br /&gt;
/etc/init.d/winbind restart&lt;br /&gt;
chkconfig winbind on&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/2149681912183876316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/2149681912183876316'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2015/11/joining-centos-and-authenticate-to.html' title='Joining CentOS and authenticate to ACtive Directory using winbind'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-3968750495300518120</id><published>2015-09-03T17:46:00.000-07:00</published><updated>2015-09-03T18:46:25.882-07:00</updated><title type='text'>Some Backup script for postgresql 9.3 database - using parallel run</title><content type='html'>&lt;span style=&quot;font-size: x-small;&quot;&gt;#!/bin/bash&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;#set-x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;#Original Script Owner#&lt;br /&gt;# #backuppostgresql.sh&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;#by #CraigSanders&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;#this script is public domain.&amp;nbsp; feel free to use or modify as you like.&lt;br /&gt;## Modified by: yongitz and ohbet - 2015 of September&lt;br /&gt;#Note&lt;br /&gt;# to restore database from this backup&lt;br /&gt;# Command is: /usr/pgsql-9.3/bin/pg_restore -j -Fd $DATA&lt;br /&gt;# where data is the path of the backup /db/BACKUP/Date-of-backup/Database_Name-folder&lt;br /&gt;# /usr/pgsql-9.3/bin/pg_restore -j -Fd /db/BACKUP/2015-09-04/database_folder&lt;br /&gt;# See postgresql 9.3 manual page for details&lt;br /&gt;#&lt;br /&gt;PGDUMP=&quot;/usr/pgsql-9.3/bin/pg_dump&quot;&lt;br /&gt;PSQL=&quot;/usr/pgsql-9.3/bin/psql&quot;&lt;br /&gt;# &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;# directory to save backups in, must be owned by postgres user&lt;br /&gt;BASE_DIR=&quot;/db/BACKUP&quot;&lt;br /&gt;#Make some checking if backup folder is available&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;#&lt;br /&gt;if ! ls $BASE_DIR &amp;gt; /dev/null 2&amp;gt;&amp;amp;1; then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;Backup directory $BASE_DIR does not exist. Backup processes terminated.&quot; | mail -s &quot;!!! ALERT - BACKUP PROCESS FAILED @ DBSERVERXYZ !!!&quot; db.admin@mycompany.com&lt;br /&gt;exit 1&lt;br /&gt;fi&lt;br /&gt;#Create the Base Directory&lt;br /&gt;YMD=$(date &quot;+%Y-%m-%d&quot;)&lt;br /&gt;DIR=&quot;$BASE_DIR/$YMD&quot;&lt;br /&gt;ls -l $BASE_DIR&lt;br /&gt;mkdir -p $DIR&lt;br /&gt;cd $DIR&lt;br /&gt;#&lt;br /&gt;# get list of databases in system , exclude the tempate db and other db not needed, db below are example only&lt;br /&gt;DBS=$($PSQL -l -t | egrep -v &#39;template[01]|dbxyz|db2|db_warehouse&#39; | awk &#39;{print $1}&#39; | grep -v &#39;|&#39;|grep -v &#39;^$&#39;)&lt;br /&gt;#&lt;br /&gt;# now loop through each individual database&lt;br /&gt;for database in $DBS; do&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATA=$DIR/$database&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # dump data&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if [ $database = db_live_final ]; then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Remarks: j8 = 8 parallel process to run: at 9.3 and above&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Remarks: -N backup_tables and -N DBX_* are schema that are excluded on backup&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $PGDUMP -v -j8 -N backup_tables -N DBX_* -Fd -f $DATA $database &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $PGDUMP -v -j8 -Fd -f $DATA $database&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fi&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;#copy conf files currently used.&lt;br /&gt;cp /db/pgsql/9.3/data/*.conf $DIR/&lt;br /&gt;#&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;#Create readme for restore&lt;br /&gt;cat &amp;lt;&lt;eof&gt; $DIR/Restore_readme.txt&lt;br /&gt;To restore database from this backup&lt;br /&gt;Use Command:&lt;br /&gt;/usr/pgsql-9.3/bin/pg_restore -j -Fd /path/to/backup/folder/per/db/name&lt;br /&gt;where data is the path of the backup /db/BACKUP/Date-of-backup/Database_Name-folder&lt;br /&gt;Sample Below:&lt;br /&gt;/usr/pgsql-9.3/bin/pg_restore -j -Fd /db/BACKUP/2015-09-04/database_folder&lt;br /&gt;See postgresql 9.3 manual page for further details&lt;br /&gt;EOF&lt;br /&gt;# &lt;/eof&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;# delete backup files older than 30 days&lt;br /&gt;OLD=$(find $BASE_DIR -type d -mtime +30)&lt;br /&gt;if [ -n &quot;$OLD&quot; ] ; then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo deleting old backup files: $OLD&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $OLD | xargs rm -rf&lt;br /&gt;fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Then save this as bash script and put on a cron to run daily.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/3968750495300518120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/3968750495300518120'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2015/09/some-backup-script-for-postgresql-93.html' title='Some Backup script for postgresql 9.3 database - using parallel run'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-4156277806408917796</id><published>2014-11-16T17:59:00.003-08:00</published><updated>2014-11-16T18:05:42.529-08:00</updated><title type='text'>Redirect http to https with multiple VirtualHost on apache</title><content type='html'>Goal: Redirect all http to https, domain are config.example.com and configure.example.com. &lt;br /&gt;
&lt;br /&gt;
When first try on it, I encountered redirect problem, when you dont place carefully the virtual host, redirection will got problem, so on my example, I need to place carefully, config http then https, and configure http then https. It should also redirect properly when you have a sub folder.&lt;br /&gt;
&lt;br /&gt;
Note: I changed the tags to |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;virtualhost&gt;|VirtualHost *:80|&lt;virtualhost&gt;&lt;br /&gt;ServerName config.example.com/&lt;br /&gt;RedirectMatch 301 /(.*)$ https://config.example.com/$1&lt;/virtualhost&gt;&lt;/virtualhost&gt;&lt;br /&gt;
&lt;virtualhost&gt;&lt;/virtualhost&gt;&lt;br /&gt;
&lt;virtualhost&gt;&lt;/virtualhost&gt;&lt;br /&gt;
&lt;virtualhost&gt;&lt;/virtualhost&gt;&lt;br /&gt;
&lt;virtualhost&gt;&lt;/virtualhost&gt;|/VirtualHost|&lt;br /&gt;
&lt;virtualhost&gt;&lt;/virtualhost&gt;&lt;br /&gt;
&lt;virtualhost&gt;&lt;br /&gt;&lt;/virtualhost&gt;
|VirtualHost *:443|&lt;br /&gt;
&lt;virtualhost&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SSLEngine on&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SSLProtocol -ALL -SSLv3 +TLSv1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SSLCertificateFile /etc/pki/example_cert_2017/example.com.crt&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SSLCertificateKeyFile /etc/pki/example_cert_2017/example.key&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SSLCertificateChainFile /etc/pki/example_cert_2017/gd_bundle.crt&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerName config.example.com&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerAlias config.example.com&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DocumentRoot &quot;/data/www/config&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorLog logs/ssl-config-error_log&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CustomLog logs/ssl-config-access.log common&lt;/virtualhost&gt;&lt;br /&gt;
|/VirtualHost|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;virtualhost&gt;|VirtualHost *:80|&lt;/virtualhost&gt;&lt;br /&gt;
&lt;virtualhost&gt;ServerName configure.example.com&lt;br /&gt;RedirectMatch 301 /(.*)$ https://configure.example.com/$1&lt;/virtualhost&gt;&lt;br /&gt;
|/VirtualHost|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;virtualhost&gt;&lt;/virtualhost&gt;

|VirtualHost *:443|&lt;br /&gt;
&lt;virtualhost&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SSLEngine on&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SSLProtocol -ALL -SSLv3 +TLSv1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SSLCertificateFile /etc/pki/example_cert_2017/example.com.crt&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SSLCertificateKeyFile /etc/pki/example_cert_2017/example.key&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SSLCertificateChainFile /etc/pki/example_cert_2017/gd_bundle.crt&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerName configure.example.com&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerAlias configure.example.com&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DocumentRoot &quot;/data/www/configure&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorLog logs/ssl-configure-error_log&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CustomLog logs/ssl-configure-access.log common&lt;/virtualhost&gt;&lt;br /&gt;
&lt;virtualhost&gt;&amp;nbsp;&lt;/virtualhost&gt;|/VirtualHost|</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/4156277806408917796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/4156277806408917796'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2014/11/redirect-http-to-https-with-multiple.html' title='Redirect http to https with multiple VirtualHost on apache'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-3310554520146375373</id><published>2014-11-12T00:24:00.003-08:00</published><updated>2014-11-12T00:36:01.619-08:00</updated><title type='text'>Zimbra email retention under 30 days</title><content type='html'>Normally, zimbra COS can allocate only at least 30 Days and more of email retention, and if lower than 30 days is required, COS is not capable. (Well, you may correct my if I am wrong)&lt;br /&gt;
&lt;br /&gt;
Below is a sample script to do the Job.&lt;br /&gt;
&lt;br /&gt;
1. Create a zimbra distro list that will become the bases of user list that have a threshold. For example, 7days_users@list.example.com is the distro, member of this will have a retention of 7 days.&lt;br /&gt;
&lt;br /&gt;
2. The script.&lt;br /&gt;
&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#Generate the members of 7days_users and pipe it on a temp file. &lt;br /&gt;
zmprov gdlm 7days_users@list.example.com |egrep -v &#39;^#|members&#39; &amp;gt; /tmp/_TMP7days&lt;br /&gt;
#&lt;br /&gt;
for USER in `cat /tmp/_TMP7days`&lt;br /&gt;
do&lt;br /&gt;
zmmailbox -z -m $USER s -t message -l 1000&amp;nbsp; &quot;before:`date +%x --date=&quot;7 days ago&quot;`&quot; |grep mess |awk &#39;{print $2}&#39; &amp;gt; /tmp/7days_$USER&lt;br /&gt;
done&lt;br /&gt;
##delete ID&lt;br /&gt;
for UserName in `cat /tmp/_TMP7days`&lt;br /&gt;
do&lt;br /&gt;
for MAILID in `cat /tmp/7days_$UserName`&lt;br /&gt;
do&lt;br /&gt;
zmmailbox -z -m $UserName dm $MAILID&lt;br /&gt;
done&lt;br /&gt;
done&lt;br /&gt;
#end of script</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/3310554520146375373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/3310554520146375373'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2014/11/zimbra-email-retention-under-30-days.html' title='Zimbra email retention under 30 days'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-5064195486278244710</id><published>2014-10-06T17:51:00.003-07:00</published><updated>2014-10-06T17:51:52.357-07:00</updated><title type='text'>Updating openssl to latest</title><content type='html'>Updating openssl to latest&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the latest openssl source, as of this writing, the latest is the one I installed.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;https://www.openssl.org/source/&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;b&gt; Bytes      Timestamp       Filename&lt;/b&gt;
&lt;b&gt;________ ____________________ ____________________________&lt;/b&gt;
 5149260 Sep 25 22:45:26 2014 &lt;a href=&quot;https://www.openssl.org/source/openssl-1.0.2-beta3.tar.gz&quot;&gt;openssl-1.0.2-beta3.tar.gz&lt;/a&gt; (&lt;a href=&quot;https://www.openssl.org/source/openssl-1.0.2-beta3.tar.gz.md5&quot;&gt;MD5&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-1.0.2-beta3.tar.gz.sha1&quot;&gt;SHA1&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-1.0.2-beta3.tar.gz.asc&quot;&gt;PGP sign&lt;/a&gt;)
 1404199 Aug 20 12:52:55 2014 &lt;a href=&quot;https://www.openssl.org/source/openssl-fips-ecp-2.0.8.tar.gz&quot;&gt;openssl-fips-ecp-2.0.8.tar.gz&lt;/a&gt; (&lt;a href=&quot;https://www.openssl.org/source/openssl-fips-ecp-2.0.8.tar.gz.md5&quot;&gt;MD5&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-fips-ecp-2.0.8.tar.gz.sha1&quot;&gt;SHA1&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-fips-ecp-2.0.8.tar.gz.asc&quot;&gt;PGP sign&lt;/a&gt;)
 1424766 Aug 20 12:52:46 2014 &lt;a href=&quot;https://www.openssl.org/source/openssl-fips-2.0.8.tar.gz&quot;&gt;openssl-fips-2.0.8.tar.gz&lt;/a&gt; (&lt;a href=&quot;https://www.openssl.org/source/openssl-fips-2.0.8.tar.gz.md5&quot;&gt;MD5&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-fips-2.0.8.tar.gz.sha1&quot;&gt;SHA1&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-fips-2.0.8.tar.gz.asc&quot;&gt;PGP sign&lt;/a&gt;)
 3727934 Aug  6 23:56:45 2014 &lt;a href=&quot;https://www.openssl.org/source/openssl-0.9.8zb.tar.gz&quot;&gt;openssl-0.9.8zb.tar.gz&lt;/a&gt; (&lt;a href=&quot;https://www.openssl.org/source/openssl-0.9.8zb.tar.gz.md5&quot;&gt;MD5&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-0.9.8zb.tar.gz.sha1&quot;&gt;SHA1&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-0.9.8zb.tar.gz.asc&quot;&gt;PGP sign&lt;/a&gt;)
 3994771 Aug  6 23:56:45 2014 &lt;a href=&quot;https://www.openssl.org/source/openssl-1.0.0n.tar.gz&quot;&gt;openssl-1.0.0n.tar.gz&lt;/a&gt; (&lt;a href=&quot;https://www.openssl.org/source/openssl-1.0.0n.tar.gz.md5&quot;&gt;MD5&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-1.0.0n.tar.gz.sha1&quot;&gt;SHA1&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-1.0.0n.tar.gz.asc&quot;&gt;PGP sign&lt;/a&gt;)
&lt;span style=&quot;color: #cc3333;&quot;&gt; 4422117 Aug  6 23:56:45 2014 &lt;a href=&quot;https://www.openssl.org/source/openssl-1.0.1i.tar.gz&quot;&gt;&lt;span style=&quot;color: #cc3333;&quot;&gt;openssl-1.0.1i.tar.gz&lt;/span&gt;&lt;/a&gt; (&lt;a href=&quot;https://www.openssl.org/source/openssl-1.0.1i.tar.gz.md5&quot;&gt;MD5&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-1.0.1i.tar.gz.sha1&quot;&gt;SHA1&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-1.0.1i.tar.gz.asc&quot;&gt;PGP sign&lt;/a&gt;)&amp;nbsp;&amp;nbsp;&lt;b&gt;[LATEST]&lt;/b&gt;&lt;/span&gt;
 4872101 Jul 22 22:53:02 2014 &lt;a href=&quot;https://www.openssl.org/source/openssl-1.0.2-beta2.tar.gz&quot;&gt;openssl-1.0.2-beta2.tar.gz&lt;/a&gt; (&lt;a href=&quot;https://www.openssl.org/source/openssl-1.0.2-beta2.tar.gz.md5&quot;&gt;MD5&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-1.0.2-beta2.tar.gz.sha1&quot;&gt;SHA1&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-1.0.2-beta2.tar.gz.asc&quot;&gt;PGP sign&lt;/a&gt;)
 1438620 Jul  4 01:21:08 2014 &lt;a href=&quot;https://www.openssl.org/source/openssl-fips-2.0.7.tar.gz&quot;&gt;openssl-fips-2.0.7.tar.gz&lt;/a&gt; (&lt;a href=&quot;https://www.openssl.org/source/openssl-fips-2.0.7.tar.gz.md5&quot;&gt;MD5&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-fips-2.0.7.tar.gz.sha1&quot;&gt;SHA1&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-fips-2.0.7.tar.gz.asc&quot;&gt;PGP sign&lt;/a&gt;)
 1417674 Jul  4 01:21:08 2014 &lt;a href=&quot;https://www.openssl.org/source/openssl-fips-ecp-2.0.7.tar.gz&quot;&gt;openssl-fips-ecp-2.0.7.tar.gz&lt;/a&gt; (&lt;a href=&quot;https://www.openssl.org/source/openssl-fips-ecp-2.0.7.tar.gz.md5&quot;&gt;MD5&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-fips-ecp-2.0.7.tar.gz.sha1&quot;&gt;SHA1&lt;/a&gt;) (&lt;a href=&quot;https://www.openssl.org/source/openssl-fips-ecp-2.0.7.tar.gz.asc&quot;&gt;PGP sign&lt;/a&gt;)&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Login to your server as root.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;
wget https://www.openssl.org/source/openssl-1.0.1i.tar.gz&lt;br /&gt;

as root&lt;br /&gt;

tar xzvf openssl-1.0.1i.tar.gz&lt;br /&gt;

cd openssl-1.0.1i&lt;br /&gt;

./config&lt;br /&gt;

make&lt;br /&gt;

make test&lt;br /&gt;

make install&lt;br /&gt;

Installation is at /usr/local/ssl/bin/openssl&lt;br /&gt;

move old openssl&lt;br /&gt;

mv /usr/bin/openssl /root/openssl-old&lt;br /&gt;

ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl&lt;br /&gt;

check version&lt;br /&gt;
&lt;br /&gt;

openssl version&lt;br /&gt;
&lt;br /&gt;

OpenSSL 1.0.1i 6 Aug 2014&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Though its better to recompile it as RPM on your build server so as to follow best practice that your production server particular to the one that facing internet should not contain any compiler. &lt;/span&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/5064195486278244710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/5064195486278244710'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2014/10/updating-openssl-to-latest.html' title='Updating openssl to latest'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-2699192699294356496</id><published>2013-06-25T00:32:00.004-07:00</published><updated>2013-06-25T00:32:51.582-07:00</updated><title type='text'>Reversing SVN using good revision number</title><content type='html'>When updating the codes or code only using svn, below usually is the output:&lt;br /&gt;
&lt;br /&gt;
-bash-3.2$ svn update --force&lt;br /&gt;svn.user@192.168.1.1&#39;s password: &lt;br /&gt;U&amp;nbsp;&amp;nbsp;&amp;nbsp; code01.php&lt;br /&gt;Updated to revision 15701.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
but if the dev team wants to revert that to previous revision because there was an error on the code, then the possible command is below:&lt;br /&gt;
&lt;br /&gt;
say, the good revision is 15690 as per dev.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-bash-3.2$ svn merge -r HEAD:15690 code01.php&lt;br /&gt;svn.user@192.168.1.1&#39;s password:&lt;br /&gt;
--- Reverse-merging r15701 through r15691 into &#39;code01.php&#39;:&lt;br /&gt;U&amp;nbsp;&amp;nbsp;&amp;nbsp; code01.php&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now reverted back to a good revision.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/2699192699294356496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/2699192699294356496'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2013/06/reversing-svn-using-good-revision-number.html' title='Reversing SVN using good revision number'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-4422039258717894519</id><published>2013-06-20T06:13:00.001-07:00</published><updated>2013-06-20T06:13:24.646-07:00</updated><title type='text'>Monitoring a directory for new file, deleted file, modified file with inotifywait and send thru email</title><content type='html'>On my setup, I am using CentOS&lt;br /&gt;
&lt;br /&gt;
Add epel repo&lt;br /&gt;
&lt;br /&gt;
yum install inotify-tools&lt;br /&gt;
&lt;br /&gt;
create a bash script at /usr/ocal/bin/inotify_daemon.sh with entry below:&lt;br /&gt;
&lt;br /&gt;
#!/bin/bash&lt;br /&gt;pgrep inotifywait &amp;gt; /dev/null&lt;br /&gt;if [ $? -eq 0 ]&lt;br /&gt;then&lt;br /&gt;exit&lt;br /&gt;else&lt;br /&gt;inotifywait --format &#39;%w%f %e %T&#39; --timefmt &#39;%Y/%m/%d-%H:%M:%S&#39; -e create,delete,modify,move -mrq /path/to/folder/ |while read file;do echo $file | mail -s &quot;activity alert&quot; myuser@mydomain.com; done &amp;amp;&lt;br /&gt;fi&lt;br /&gt;
&lt;br /&gt;
then create a cron entry at crontab or root cron.&lt;br /&gt;
&lt;br /&gt;
* * * * * /usr/ocal/bin/inotify_daemon.sh&lt;br /&gt;
&lt;br /&gt;
The cron will run and if&amp;nbsp; inotify_daemon.sh get accidentally killed, it will run it again. If already running, then it will exit.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
I assume that the server has a working smtp and tested to relay email to a ligit and working email system.&lt;br /&gt;
&lt;br /&gt;
Sample email body once it will work is below:&lt;br /&gt;
&lt;br /&gt;
/path/to/folder/test2 DELETE,ISDIR 2013/06/20-05:11:09&lt;br /&gt;
&lt;br /&gt;
the notification that the folder has been deleted.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/4422039258717894519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/4422039258717894519'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2013/06/monitoring-directory-for-new-file.html' title='Monitoring a directory for new file, deleted file, modified file with inotifywait and send thru email'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-2519996432850201840.post-2266675768278372402</id><published>2013-06-18T00:38:00.006-07:00</published><updated>2013-06-18T02:12:21.751-07:00</updated><title type='text'>chroot sftp</title><content type='html'>Please update the openssl-server at least&lt;br /&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;openssh-server-5-xx or &lt;/span&gt;
&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;
&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;openssh-server-6-xx&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;CentOS 6.3 has  &lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;openssh-server-5-xx already.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;Ok, assuming that above version has been aquired.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;below are my process.. some process are based on results if you google sftp + chroot, just make my self a note to remember.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;I am creating a user.sftp user account and sftpusers group as sample.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;1. create a group named sftpusers -- groupadd sftpusers&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;2. mkdir /ftp/sftpusers ---------&amp;gt; this will be my users root home directory.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;3. add a user to be used for sftp&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt; useradd -g sftpusers -d /ftp/sftpusers/user.sftp -s /sbin/nologin user.sftp&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;4. edit the file /etc/ssh/sshd_config&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;comment out the line that contains:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;Subsystem      sftp    /usr/libexec/openssh/sftp-server&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;and replaced with:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;#----&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;Subsystem      sftp    /usr/libexec/openssh/sftp-server&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;Subsystem       sftp    internal-sftp&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
#----&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
then append the Match Group entry.&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
#----&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;Match Group sftpusers&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;        ChrootDirectory /ftp/sftpusers/%u&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;        ForceCommand internal-sftp&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
#----&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;5. create a folder inside /ftp/sftpusers/user.sftp/ and name it anything, here, I named it upload_dir&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt; mkdir  /ftp/sftpusers/user.sftp/upload_dir&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;6. ownership&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;chown root /ftp/sftpusers/user.sftp&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;chmod go-w /ftp/sftpusers/user.sftp&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;chown user.sftp:sftpusers /ftp/sftpusers/user.sftp/upload_dir&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;chmod u+rwX /ftp/sftpusers/user.sftp&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;chmod g+rx /ftp/sftpusers/user.sftp&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;check the owner, should be&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;drwxr-xr-x. 3 root sftpusers 4096 Jun 17 21:45 user.sftp&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;7. restart sshd service&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;when user is able to login via sftp client, if he tries to travserve to other dir.. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;error will be like below.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;ftp&amp;gt; cd /etc/&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;Couldn&#39;t canonicalise: No such file or directory&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt;&quot;&gt;sftp&amp;gt; ls&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;-qt-block-indent: 0; -qt-paragraph-type: empty; color: black; font-family: &#39;Sans Serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/2266675768278372402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2519996432850201840/posts/default/2266675768278372402'/><link rel='alternate' type='text/html' href='http://configs.blogspot.com/2013/06/chroot-sftp.html' title='chroot sftp'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>