<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Network &#8211; LarryLai</title>
	<atom:link href="https://larrylai.com/category/it/network/feed/" rel="self" type="application/rss+xml" />
	<link>https://larrylai.com</link>
	<description>兼聽則明 偏聽則暗</description>
	<lastBuildDate>Tue, 14 Mar 2017 06:27:16 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://larrylai.com/wp-content/uploads/2017/03/larrylai_com-favicon.png</url>
	<title>Network &#8211; LarryLai</title>
	<link>https://larrylai.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Cannot Change Ownership on NFS Files</title>
		<link>https://larrylai.com/cannot-change-ownership-nfs-files/</link>
					<comments>https://larrylai.com/cannot-change-ownership-nfs-files/#respond</comments>
		
		<dc:creator><![CDATA[larry]]></dc:creator>
		<pubDate>Tue, 14 Mar 2017 06:24:26 +0000</pubDate>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[nfs]]></category>
		<guid isPermaLink="false">http://larrylai.com/?p=2785</guid>

					<description><![CDATA[<p>Issue: After moving mounted volumes from Qnap NAS to iMac as host with CentOS as client, the directory and file ownership cannot be changed to Apache at the client side. No matter using root or user privilege to command the chown. Solution: Add the following in iMac&#8217;s /etc/exports: [nfsshare] -rw -maproot=root:wheel Tricks: -maproot directive can pass the [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/cannot-change-ownership-nfs-files/">Cannot Change Ownership on NFS Files</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Issue:</strong></p>
<p>After moving mounted volumes from Qnap NAS to iMac as host with CentOS as client, the directory and file ownership cannot be changed to Apache at the client side. No matter using root or user privilege to command the <code>chown.</code></p>
<p><strong>Solution:</strong></p>
<p>Add the following in iMac&#8217;s /etc/exports:</p>
<p><code>[nfsshare] -rw -maproot=root:wheel</code></p>
<p><strong>Tricks:</strong></p>
<p>-maproot directive can pass the root control from nfs host to client, without it even changing the directory access and file permission to 777 in host, or changing the mount options at client cannot solve the issue.</p>
<p><strong>Config:</strong></p>
<ul>
<li>OSX:        10.12.3</li>
<li>CentOS:   7.3</li>
</ul>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/cannot-change-ownership-nfs-files/">Cannot Change Ownership on NFS Files</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://larrylai.com/cannot-change-ownership-nfs-files/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Fix WiFi Range Extender Performance Issue</title>
		<link>https://larrylai.com/fix-wifi-range-extender-performance-issue/</link>
		
		<dc:creator><![CDATA[larry]]></dc:creator>
		<pubDate>Sat, 31 Dec 2016 14:43:45 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Netgear EX6120]]></category>
		<category><![CDATA[Repeater Performance]]></category>
		<category><![CDATA[WiFi Extender]]></category>
		<guid isPermaLink="false">http://larrylai.com/?p=2334</guid>

					<description><![CDATA[<p>Issue: Netgear EX6120 Range Extender connection to router initially with acceptable signal strength, then suddenly it dropped to low level around 6Mbps. Solution: Set channel of the WiFi router from &#8220;auto&#8221; to a fixed channel no. Further more, among several ways to choose proper channel of the router, one of those is to follow the list [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/fix-wifi-range-extender-performance-issue/">Fix WiFi Range Extender Performance Issue</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Issue:</strong></p>
<p>Netgear EX6120 Range Extender connection to router initially with acceptable signal strength, then suddenly it dropped to low level around 6Mbps.</p>
<p><strong>Solution:</strong></p>
<p>Set channel of the WiFi router from &#8220;auto&#8221; to a fixed channel no. Further more, among several ways to choose proper channel of the router, one of those is to follow the list below:</p>
<ol>
<li>Open Wireless Diagnostics by pressing option key in Mac simultaneously</li>
<li>clicking the WiFi icon in the top bar, then</li>
<li>on the top bar, click Window and choose &#8220;scan&#8221;</li>
</ol>
<p><strong>Tricks:</strong></p>
<p>Configuring the Range Extender, usually it does not help to improve the sustainable performance of the connection between Range Extender and WiFi router. After fixing the channel no. of the router, the WiFi Range Extender connection with the WiFi router still dropped a bit after a while, but instead of dropping to 6Mbps in my case, the resulting connection signal strength could be kept to around 80Mbps.</p>
<p><strong>Config:</strong></p>
<ul>
<li>WiFi Router:         Linksys EA6700</li>
<li>Range Extender:  Netgear EX6120</li>
<li>Mac OS:               10.12.2</li>
</ul>
<p>The post <a rel="nofollow" href="https://larrylai.com/fix-wifi-range-extender-performance-issue/">Fix WiFi Range Extender Performance Issue</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Aztech Homeplug Mixed Models</title>
		<link>https://larrylai.com/aztech-homeplug-mixed-models/</link>
		
		<dc:creator><![CDATA[larry]]></dc:creator>
		<pubDate>Tue, 19 Jan 2016 16:29:51 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Network]]></category>
		<guid isPermaLink="false">http://blog.larrylai.com/?p=2056</guid>

					<description><![CDATA[<p>Issue: One unit of the Homeplug pair from Aztech broke suddenly, no led, no response even pressing reset button. Buy a new one is the only option. But buying just one unit or a new pair of homeplug? One of the homeplug seems to be still working, at least the power led is still on. However, [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/aztech-homeplug-mixed-models/">Aztech Homeplug Mixed Models</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Issue:</strong></p>
<p>One unit of the Homeplug pair from Aztech broke suddenly, no led, no response even pressing reset button. Buy a new one is the only option. But buying just one unit or a new pair of homeplug? One of the homeplug seems to be still working, at least the power led is still on. However, the Aztech model 110E is obsolete.</p>
<p><strong>Solution:</strong></p>
<ul>
<li>Buy a similar model from Aztech and try if the mixed models pair, i.e. 110E and 113E can be pair-up. First try failed, only power led of the pair are on, the homeplug led in the middle were both off even pressing the connect button for over 10 sec.</li>
<li>Try again by putting both units on the same power extension bar. Press the reset/connect button of the new unit, 113E for over 10 seconds. Wait for several seconds, then press the connect button of the old model, 110E for 2 seconds. the middle led of both units turned green, i.e. connection setup succeeded. the last led is on only when it is connected with ethernet cable.</li>
<li>Unplug one of the unit and place it remotely to another power extension bar, and connect ethernet cable for both unit. Then every thing is fine. Now TV can now be working properly using homeplug network connect again.</li>
</ul>
<p><strong>Tricks:</strong></p>
<p>Theoretically, the 2 units can be placed in remote power outlet or remote power extension bars during connection setup process, but it is not easy when the 2 power bars are far away and trouble shooting is not easy in such situation. Placing both units on the same power extension bar is good practice, I think.</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/aztech-homeplug-mixed-models/">Aztech Homeplug Mixed Models</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Mailbox Migration using Thunderbird</title>
		<link>https://larrylai.com/mailbox-migration-using-thunderbird/</link>
		
		<dc:creator><![CDATA[larry]]></dc:creator>
		<pubDate>Thu, 31 Dec 2015 16:52:33 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Mailbox]]></category>
		<category><![CDATA[Thunderbird]]></category>
		<category><![CDATA[zPanel]]></category>
		<guid isPermaLink="false">http://blog.larrylai.com/?p=2050</guid>

					<description><![CDATA[<p>Issue: Mail user, actually my wife sending out emails through my zPanel hosting platform confuses recipients with the old domain name as a year ago, the quick and dirty way to get emails to the new domain name, wxxx.com was to configure an alias to forward all emails from old domain, exxx.com to the new [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/mailbox-migration-using-thunderbird/">Mailbox Migration using Thunderbird</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Issue:</strong></p>
<p>Mail user, actually my wife sending out emails through my zPanel hosting platform confuses recipients with the old domain name as a year ago, the quick and dirty way to get emails to the new domain name, wxxx.com was to configure an alias to forward all emails from old domain, exxx.com to the new one dedicated to my wife&#8217;s business. But she now wants all recipients notice that her emails are sending out from wxxx.com.</p>
<p><strong>Solution:</strong></p>
<p>After thinking for a while and search for a technical way to migrate the old mailboxes to the new one, I found there is no easy way offered by zPanel to accomplish such task, thus by adding a new mailbox in zPanel, I use a simple but reliable way to accomplish it through Thunderbird.</p>
<p>Adding 2 accounts in Thunderbird, one according to the new mailbox, and one according to the old one, then just copy the mailboxes from the old one to the new by drag-and-drop of the folders and Thunderbird can handle all the copy and paste tasks in few minutes without pain.</p>
<p>The beauty of this method is a simple way by just an email client on any platform and configuration of zPanel through a browser. No need to actually touch the mail directories in the server.</p>
<p><strong>Configuration:</strong></p>
<ul>
<li>zPanel    10.1.1</li>
<li>ThunderBird 31.2.0</li>
<li>CentOS   6.7</li>
</ul>
<p>The post <a rel="nofollow" href="https://larrylai.com/mailbox-migration-using-thunderbird/">Mailbox Migration using Thunderbird</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Demystify iCloud Sync</title>
		<link>https://larrylai.com/demystify-icloud-sync/</link>
		
		<dc:creator><![CDATA[larry]]></dc:creator>
		<pubDate>Sun, 13 Dec 2015 09:42:56 +0000</pubDate>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[System]]></category>
		<guid isPermaLink="false">http://blog.larrylai.com/?p=2031</guid>

					<description><![CDATA[<p>Issue: Uploaded keynote file to iCloud through safari, after a day the iPad still could not see it when clicking the &#8220;+&#8221; sign at top left corner of Keynote in iPad. Solution: Go to Settings in iOS device, click iCloud and turn it off for a while then turn it on again Tricks: People would [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/demystify-icloud-sync/">Demystify iCloud Sync</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Issue:</strong></p>
<p>Uploaded keynote file to iCloud through safari, after a day the iPad still could not see it when clicking the &#8220;+&#8221; sign at top left corner of Keynote in iPad.</p>
<p><strong>Solution:</strong></p>
<p>Go to Settings in iOS device, click iCloud and turn it off for a while then turn it on again</p>
<p><strong>Tricks:</strong></p>
<p>People would ask why not using Google Drive to transfer the files. It is interesting that when you upload a keynote file to Google Drive, the file will become a set of files including data and various image files under a folder with the name of the keynote file, then it is useless to download it to the iOS, i.e. you cannot play anything about the original keynote file in your iOS devices.</p>
<p><strong>Config:</strong></p>
<p>iOS    9.1</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/demystify-icloud-sync/">Demystify iCloud Sync</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Gmail Authentication Issue</title>
		<link>https://larrylai.com/gmail-authentication-issue/</link>
		
		<dc:creator><![CDATA[larry]]></dc:creator>
		<pubDate>Tue, 11 Aug 2015 21:47:13 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Network]]></category>
		<guid isPermaLink="false">http://blog.larrylai.com/?p=2010</guid>

					<description><![CDATA[<p>Issue: Gmail Account cannot be accessed from KMail. Solution: Login to Google account from Chrome Visit Google&#8217;s supporting page for less secure apps Select: Turn on Access for less secure apps Config: KMail   4.11.5 Tricks: Even updating KMail, and from which re-login the google account does not solve the issue Not just KMail in [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/gmail-authentication-issue/">Gmail Authentication Issue</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Issue:</strong></p>
<p>Gmail Account cannot be accessed from KMail.</p>
<p><strong>Solution:</strong></p>
<p>Login to Google account from Chrome</p>
<p>Visit Google&#8217;s supporting page for <a title="Google Support" href="https://www.google.com/settings/security/lesssecureapps" target="_blank" rel="noopener">less secure apps</a></p>
<p>Select: Turn on Access for less secure apps</p>
<p><strong>Config:</strong></p>
<p>KMail   4.11.5</p>
<p><strong>Tricks:</strong></p>
<p>Even updating KMail, and from which re-login the google account does not solve the issue</p>
<p>Not just KMail in OpenSuse is considered as less secure apps, some copiers with scanner function and SMTP setting for email out scanned documents like Konica C554e copier are considered by Google as less secure apps (devices)!</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/gmail-authentication-issue/">Gmail Authentication Issue</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>ProFTP problem with FileZilla client</title>
		<link>https://larrylai.com/proftp-problem-with-filezilla-client/</link>
		
		<dc:creator><![CDATA[larry]]></dc:creator>
		<pubDate>Mon, 02 Feb 2015 16:52:15 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Network]]></category>
		<guid isPermaLink="false">http://blog.larrylai.com/?p=1879</guid>

					<description><![CDATA[<p>Issue: After updating Filezilla client, uploading files and folders to ProFTP server will stop after a while, say after 100MB uploaded but still there are over GB files on the queue. Restarting connection to ftp server does not work. Solution: After checking the TLS log file of the ftp server, following repeated error is found: [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/proftp-problem-with-filezilla-client/">ProFTP problem with FileZilla client</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Issue:</strong></p>
<p>After updating Filezilla client, uploading files and folders to ProFTP server will stop after a while, say after 100MB uploaded but still there are over GB files on the queue. Restarting connection to ftp server does not work.</p>
<p><strong>Solution:</strong></p>
<p>After checking the TLS log file of the ftp server, following repeated error is found:</p>
<p>client did not reuse SSL session, rejecting data connection (see TLSOption NoSessionReuseRequired)</p>
<p>Add the following to the proftpd config file can solve the problem:</p>
<p style="padding-left: 30px;">TLSRenegotiate none<br />
TLSOptions NoSessionReuseRequired</p>
<p><strong>Tricks:</strong></p>
<p>Adjusting settings on ftp client, FileZilla seems to be better but actually does not help, say reducing maximum simultaneous transfers or Enable speed limits</p>
<p>Probably it is the limitation of latest version of FileZilla, but practically it is the ftp server configuration that can be changed instead of the client side.</p>
<p>In my case, ProFTPd is bundled with zPanel, and the actual config file is proftpd-mysql.conf instead of proftpd.conf located in /etc/proftpd and /etc/zpanel/configs/proftpd</p>
<p><strong>Config:</strong></p>
<p>ProFTP 1.3.3g-4</p>
<p>FileZilla 3.7.3</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/proftp-problem-with-filezilla-client/">ProFTP problem with FileZilla client</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Secret of Mounting USB Storage on Cisco Linksys Router</title>
		<link>https://larrylai.com/secret-of-mounting-usb-storage-on-cisco-linksys-router/</link>
		
		<dc:creator><![CDATA[larry]]></dc:creator>
		<pubDate>Tue, 06 May 2014 14:58:54 +0000</pubDate>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Network]]></category>
		<guid isPermaLink="false">http://blog.larrylai.com/?p=1159</guid>

					<description><![CDATA[<p>Issue: Using either Dolphin File Manager or ftp, copying a directory of around 70GB to an USB storage formatted in NTFS stopped mid-way without notification at less than 10GB copied. Checking the system log (/var/log/messages), the following was supposed to be relevant: quiet_error: 20 callbacks suppressed Buffer I/O error on device sdc1 lost page write [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/secret-of-mounting-usb-storage-on-cisco-linksys-router/">Secret of Mounting USB Storage on Cisco Linksys Router</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Issue:</strong></p>
<p><a href="http://www.samba.org" target="_blank" rel="noopener"><img fetchpriority="high" decoding="async" class="alignleft wp-image-881" src="http://blog.larrylai.com/wp-content/uploads/2014/07/servidor-de-archivos-linux-samba_iZ90XvZxXpZ2XfZ129503006-86631905589-2.jpgXsZ129503006xIM.jpg" alt="Samba Linux+Windows" width="250" height="250" /></a>Using either <a href="http://www.kde.org/applications/system/dolphin/" target="_blank" rel="noopener">Dolphin File Manager</a> or ftp, copying a directory of around 70GB to an USB storage formatted in NTFS stopped mid-way without notification at less than 10GB copied.</p>
<p>Checking the system log (/var/log/messages), the following was supposed to be relevant:</p>
<ul>
<li>quiet_error: 20 callbacks suppressed</li>
<li>Buffer I/O error on device sdc1</li>
<li>lost page write due to I/O error on sdc1</li>
</ul>
<p>Though it&#8217;s not easy to figure out what went wrong, I think it&#8217;s the front USB port/channel issue on my HP. The source directory is another USB drive connected to the rear USB port. I have tried the rear USB port to test if it&#8217;s the port issue.</p>
<p><strong>Solution:</strong></p>
<ol>
<li>remove the USB storage and connect it to the router&#8217;s USB port</li>
<li>Mount the USB storage as samba</li>
</ol>
<p><strong>Config:</strong></p>
<ul>
<li>OpenSUSE       12.3</li>
<li>Dolphin              2.2</li>
<li>KDE                  4.10.5</li>
<li>Router              Linksys  EA6700</li>
<li>FileZilla             3.7</li>
</ul>
<p><strong>Tricks:</strong></p>
<ol>
<li>Even after using a Windows 7 PC to full format the USB drive, fault still happened.</li>
<li>Merely typing smb://192.168.1.1 on Dolphin may see the samba share content but cannot write on any samba directory</li>
<li>Mounting the samba share requires stating the share directory in the command</li>
<li>To let non-root user to write on the samba share, it&#8217;s not permitted to mount the samba share from non-root user, chmod to 0777 had no change to directory permission state, but rather mount it by root and state in the option the uid of the linux user, i.e.</li>
</ol>
<p style="margin-left: 40px;"><span style="line-height: 1.5;">mount -t cifs -o uid=[userid], rw //192.168.1.1/[share] /[mount_pt]</span></p>
<p><span style="line-height: 1.5;">Though the transfer speed between the PC and router fluctuated a lot from 7MB/s to 36MB/s (using USB2.0 instead of USB3.0), it&#8217;s better to have it done eventually than using the USB port on the PC with stable transfer speed around 25MB/s and then I/O died down quietly. </span></p>
<p><span style="line-height: 1.5;">Using NTFS as the USB file system as it&#8217;s good to be share among Linux and Mac as it&#8217;s mature and both Linux and Mac have <a href="http://en.wikipedia.org/wiki/NTFS-3G" target="_blank" rel="noopener">ntfs-3g</a> utility to read and write NTFS drive. exFAT may be an alternative but not easy to find a way to deploy this Windows proprietary file system.</span></p>
<p>The post <a rel="nofollow" href="https://larrylai.com/secret-of-mounting-usb-storage-on-cisco-linksys-router/">Secret of Mounting USB Storage on Cisco Linksys Router</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>zPanel Webmail Password Change</title>
		<link>https://larrylai.com/zpanel-webmail-password-change/</link>
		
		<dc:creator><![CDATA[larry]]></dc:creator>
		<pubDate>Thu, 17 Apr 2014 04:33:11 +0000</pubDate>
				<category><![CDATA[Entrepreneur]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Tech]]></category>
		<guid isPermaLink="false">http://blog.larrylai.com/?p=1417</guid>

					<description><![CDATA[<p>Issue: zPanel is using RoundCube as the webmail frontend. It&#8217;s clean and user-friendly. However, if it is going to be used by ordinary mailbox users without zPanel admin access, users cannot change their own password through RoundCube. Deploying the Password plugin is not easy for zPanel as RoundCube is an open source webmail software, and [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/zpanel-webmail-password-change/">zPanel Webmail Password Change</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Issue:</strong></p>
<p>zPanel is using RoundCube as the webmail frontend. It&#8217;s clean and user-friendly. However, if it is going to be used by ordinary mailbox users without zPanel admin access, users cannot change their own password through RoundCube. Deploying the Password plugin is not easy for zPanel as RoundCube is an open source webmail software, and it is not dedicated for zPanel.</p>
<p><strong>Solution:</strong></p>
<ol>
<li>Open /etc/zpanel/configs/roundcube/main.inc.php</li>
<li>Deploy password plugin by modifying: <span style="line-height: 1.5;">$rcmail_config[&#8216;plugins&#8217;] = array() -&gt; $rcmail_config[&#8216;plugins&#8217;] = array(&#8216;password&#8217;)</span></li>
<li>change dir to /etc/zpanel/panel/etc/apps/webmail/plugins/password/</li>
<li>Copy config.inc.php.dist to config.inc.php</li>
<li>Change the line: <span style="line-height: 1.5;">$rcmail_config[&#8216;password_driver&#8217;] = &#8216;sql&#8217; -&gt; $rcmail_config[&#8216;password_driver&#8217;] = &#8216;zpmail&#8217;</span></li>
<li>Add the following driver contributed by <a href="http://www.overdose.ro/2013/04/roundcube-change-password-driver-for-zpanel/" target="_blank" rel="noopener">setris</a>.</li>
<li>Name it as zpmail.php and put it under directory ../plugins/password/drivers/:</li>
</ol>
<p style="margin-left: 40px;"><span style="line-height: 1.5;">&lt;?php</span></p>
<div style="margin-left: 40px;">/**</div>
<div style="margin-left: 40px;"> * ZpanelX SQL Password Driver</div>
<div style="margin-left: 40px;"> *</div>
<div style="margin-left: 40px;"> * Driver for passwords stored in SQL database</div>
<div style="margin-left: 40px;"> *</div>
<div style="margin-left: 40px;"> * @version 1.1</div>
<div style="margin-left: 40px;"> * @author</div>
<div style="margin-left: 40px;"> *</div>
<div style="margin-left: 40px;">*/</div>
<div style="margin-left: 40px;">class rcube_zpmail_password</div>
<div style="margin-left: 40px;">{</div>
<div style="margin-left: 40px;">    function save($curpass, $passwd)</div>
<div style="margin-left: 40px;">    {</div>
<div style="margin-left: 40px;">        $rcmail = rcmail::get_instance();</div>
<div style="margin-left: 40px;">        $local_part  = $rcmail-&gt;user-&gt;get_username(&#8216;local&#8217;);</div>
<div style="margin-left: 40px;">        $domain_part = $rcmail-&gt;user-&gt;get_username(&#8216;domain&#8217;);</div>
<div style="margin-left: 40px;">        $username    = $_SESSION[&#8216;username&#8217;];</div>
<div style="margin-left: 40px;">        $host        = $_SESSION[&#8216;imap_host&#8217;];</div>
<div style="margin-left: 40px;">        // convert domains to/from punnycode</div>
<div style="margin-left: 40px;">        if ($rcmail-&gt;config-&gt;get(&#8216;password_idn_ascii&#8217;)) {</div>
<div style="margin-left: 40px;">            $domain_part = rcube_idn_to_ascii($domain_part);</div>
<div style="margin-left: 40px;">            $username    = rcube_idn_to_ascii($username);</div>
<div style="margin-left: 40px;">            $host        = rcube_idn_to_ascii($host);</div>
<div style="margin-left: 40px;">        }</div>
<div style="margin-left: 40px;">        else {</div>
<div style="margin-left: 40px;">            $domain_part = rcube_idn_to_utf8($domain_part);</div>
<div style="margin-left: 40px;">            $username    = rcube_idn_to_utf8($username);</div>
<div style="margin-left: 40px;">            $host        = rcube_idn_to_utf8($host);</div>
<div style="margin-left: 40px;">        }</div>
<div style="margin-left: 40px;"><span style="line-height: 1.5;">        $sql = &#8216;SELECT password FROM mailbox WHERE username=&#8221;&#8216;.$username.'&#8221;&#8216;;</span></div>
<div style="margin-left: 40px;"><span style="line-height: 1.5;">        $host = &#8220;DBHOST&#8221;; // Usually localhost</span></div>
<div style="margin-left: 40px;">        $dbName = &#8220;zpanel_postfix&#8221;; // your ZPanelX postfix database. Default value here</div>
<div style="margin-left: 40px;">        $dbUser = &#8220;DBUSERNAME&#8221;;</div>
<div style="margin-left: 40px;">        $dbPass = &#8220;DBPASSWORD&#8221;;</div>
<div style="margin-left: 40px;">        try {</div>
<div style="margin-left: 40px;">            $db = new PDO(&#8220;mysql:host={$host};dbname={$dbName}&#8221;, $dbUser, $dbPass);</div>
<div style="margin-left: 40px;">            $db-&gt;setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING );</div>
<div style="margin-left: 40px;">        } catch (PDOException $e) {</div>
<div style="margin-left: 40px;">            //echo &#8216;Database error: &#8216;. $e-&gt;getMessage() . &#8221;;</div>
<div style="margin-left: 40px;">            return PASSWORD_CONNECT_ERROR;</div>
<div style="margin-left: 40px;">        }</div>
<div style="margin-left: 40px;">        $res = $db-&gt;query($sql);</div>
<div style="margin-left: 40px;">        $result = $res-&gt;fetch();$pass = $result[&#8220;password&#8221;];</div>
<div style="margin-left: 40px;">        $hash = str_replace(&#8220;{PLAIN-MD5}&#8221;, &#8220;&#8221;, $pass);</div>
<div style="margin-left: 40px;">        if (md5($curpass) != $hash)</div>
<div style="margin-left: 40px;">        {</div>
<div style="margin-left: 40px;">            // echo &#8220;Password mismatch error&#8221;;</div>
<div style="margin-left: 40px;">            return PASSWORD_ERROR;</div>
<div style="margin-left: 40px;">        }</div>
<div style="margin-left: 40px;"><span style="line-height: 1.5;">        $pass = &#8220;{PLAIN-MD5}&#8221;.md5($passwd);</span></div>
<div style="margin-left: 40px;">        $sql = &#8216;UPDATE mailbox SET password=&#8221;&#8216;.$pass.'&#8221; WHERE username=&#8221;&#8216;.$username.'&#8221;&#8216;;</div>
<div style="margin-left: 40px;">        $res = $db-&gt;query($sql);</div>
<div style="margin-left: 40px;">        if ($res) {</div>
<div style="margin-left: 40px;">                return PASSWORD_SUCCESS;</div>
<div style="margin-left: 40px;">        }</div>
<div style="margin-left: 40px;">        return PASSWORD_ERROR;</div>
<div style="margin-left: 40px;">    }</div>
<div style="margin-left: 40px;">}</div>
<div style="margin-left: 40px;">Don&#8217;t forget to change parameters: $host, $db_User, $db_Pass above appropriately.</div>
<div><strong>Config:</strong></div>
<ul>
<li>zPanel   10.1.1</li>
<li>RoundCube   0.9.5</li>
<li>Password plugin  3.2</li>
</ul>
<div><strong>Tricks:</strong></div>
<div>There are many drivers in Password plugin inlcuding the default: sql, but none of them works with zPanel. That is the reason why we need to create new driver for the plugin.</div>
<div></div>
<p>The post <a rel="nofollow" href="https://larrylai.com/zpanel-webmail-password-change/">zPanel Webmail Password Change</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>zPanel https Configuration Issues</title>
		<link>https://larrylai.com/zpanel-https-configuration-issues/</link>
		
		<dc:creator><![CDATA[larry]]></dc:creator>
		<pubDate>Fri, 17 Jan 2014 13:01:28 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Network]]></category>
		<guid isPermaLink="false">http://blog.larrylai.com/?p=1456</guid>

					<description><![CDATA[<p>Issue: After deploying zPanel for a week, seems that most of the domains, subdomains, mail server are fine. But as the webmail using Roundcube cannot be executed as it forces https. Solution: General another pair of self-generated keys from CentOS Configure /etc/httpd/conf.d/ssl.conf to use some other https port, in my case, use 8443 and configure [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/zpanel-https-configuration-issues/">zPanel https Configuration Issues</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Issue:</strong></p>
<p>After deploying zPanel for a week, seems that most of the domains, subdomains, mail server are fine. But as the webmail using Roundcube cannot be executed as it forces https.</p>
<p><strong>Solution:</strong></p>
<p>General another pair of self-generated keys from CentOS</p>
<p>Configure /etc/httpd/conf.d/ssl.conf to</p>
<ol>
<li>use some other https port, in my case, use 8443 and configure it in /etc/httpd/conf.d/ssl.conf</li>
<li>add DocumentRoot &#8220;/etc/zpanel/panel</li>
<li>add ServerName [DOMAIN.TLD]:443</li>
<li>uncomment SSLCertificateFile /etc/pki/tls/certs/[YOURCERT.crt]</li>
<li>uncomment SSLCertificateKeyFile /etc/pki/tls/private/[YOURKEY.key]</li>
</ol>
<p>Open the https port in Firewall and Router port-forwarding (if any)</p>
<p>Add directives into a new file /etc/zpanel/configs/apache/httpd-ssl-vhosts.conf to include the following:</p>
<div>############################################</div>
<div># Configuration for ZPanel control panel.</div>
<div>&lt;VirtualHost *:8443&gt;</div>
<div>ServerAdmin admin@erbeauty.com</div>
<div>DocumentRoot &#8220;/etc/zpanel/panel/&#8221;</div>
<div>ServerName zpanel.erbeauty.com</div>
<div>AddType application/x-httpd-php .php</div>
<div>&lt;Directory &#8220;/etc/zpanel/panel/&#8221;&gt;</div>
<div>Options FollowSymLinks</div>
<div>AllowOverride All</div>
<div>Order allow,deny</div>
<div>Allow from all</div>
<div>&lt;/Directory&gt;</div>
<div># Custom settings are loaded below this line (if any exist)</div>
<div>SSLEngine on</div>
<div>SSLCertificateFile /etc/pki/tls/certs/[YOURCERT.crt]</div>
<div>SSLCertificateKeyFile /etc/pki/tls/private/[YOURKEY.key]</div>
<div>#</div>
<div>&lt;/VirtualHost&gt;</div>
<div>##############################################</div>
<p>Add following line to file: /etc/httpd/conf/httpd.conf</p>
<p><span style="line-height: 1.5;">Include /etc/zpanel/configs/apache/httpd-ssl-vhosts.conf</span></p>
<p><strong>Config:</strong></p>
<ul>
<li>CentOS      6.5(x86_64)</li>
<li>zPanel        10.1.0</li>
<li>Apache      2.2.15</li>
<li>php             5.3.3</li>
</ul>
<p><strong>Tricks:</strong></p>
<p>Most of the solution on the web cannot fix the issue as some are probably for old zPanel versions that they are not aware that changing directly the httpd-vhosts.conf is inappropriate as whenever &#8220;Run Daemon Now&#8221; in zPanel Config, the httpd-vhosts.conf will be re-generated according to the Config change or unchange in the zPanel config interface.</p>
<p>Don&#8217;t directly input the httpd-vhost directives into &#8220;Module Admin&#8221; -&gt; &#8220;Apache Config&#8221; -&gt; &#8220;Global zPanel Entry&#8221;. In my experience, it doesn&#8217;t work. In practice, adding the directives into a new httpd-ssl-vhosts.conf will ensure nothing changed unexpectedly during every &#8220;Run Daemon Now&#8221; under Admin -&gt; zPanel Config.</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/zpanel-https-configuration-issues/">zPanel https Configuration Issues</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
