<?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>LINUX Help &#8211; VeriTeknik</title>
	<atom:link href="https://www.veriteknik.net.tr/en/category/knowledge_base/linux/linux_help/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.veriteknik.net.tr/en/</link>
	<description>VeriTeknik Bilişim &#124; VeriTeknik Bilişim</description>
	<lastBuildDate>Tue, 12 May 2015 10:33:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>CentOS 7 Firewall Sheet</title>
		<link>https://www.veriteknik.net.tr/en/centos-7-firewall-sheet/</link>
					<comments>https://www.veriteknik.net.tr/en/centos-7-firewall-sheet/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Tue, 12 May 2015 10:33:50 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[LINUX Help]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=997</guid>

					<description><![CDATA[<p>The best thing about CentOS 7 is, it has a super easy firewall built-in. I recommend you not to disable the firewall. To check the active zones: [root@rh7 ~]# firewall-cmd --get-active-zones public interfaces: enp1s0f0 To get available service names: [root@rh7 ~]# firewall-cmd --get-services RH-Satellite-6 amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp high-availability http https imaps [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/centos-7-firewall-sheet/">CentOS 7 Firewall Sheet</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The best thing about CentOS 7 is, it has a super easy firewall built-in. I recommend you not to disable the firewall.</p>
<p>To check the active zones:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --get-active-zones
public
  interfaces: enp1s0f0</pre>
<p>To get available service names:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --get-services
RH-Satellite-6 amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp high-availability http https imaps ipp ipp-client ipsec kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mountd ms-wbt mysql nfs ntp openvpn pmcd pmproxy pmwebapi pmwebapis pop3s postgresql proxy-dhcp radius rpc-bind samba samba-client smtp ssh telnet tftp tftp-client transmission-client vnc-server wbem-https</pre>
<p>If the service you want to enable listed with the command above, you don&#8217;t have to write explicit port number, to allow a service permanently:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --zone=public --add-service=https --permanent
success</pre>
<p>If the desired service is not available such as POP3 use the following command:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --zone=public --add-port=110/tcp --permanent
success</pre>
<p>When you finish adding/removing rules, apply them with the command:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --reload
success</pre>
<p>To check the services enabled on the zone public:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --zone=public --list-all
public (default, active)
  interfaces: enp1s0f0
  sources: 
  services: dhcpv6-client http https imaps pop3s smtp ssh
  ports: 7071/tcp 110/tcp
  masquerade: no
  forward-ports: 
  icmp-blocks: 
  rich rules:</pre>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/centos-7-firewall-sheet/">CentOS 7 Firewall Sheet</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/centos-7-firewall-sheet/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">997</post-id>	</item>
		<item>
		<title>Converting your server from virtual to physical server</title>
		<link>https://www.veriteknik.net.tr/en/converting-server-virtual-physical-server/</link>
					<comments>https://www.veriteknik.net.tr/en/converting-server-virtual-physical-server/#respond</comments>
		
		<dc:creator><![CDATA[Fehmi Can Tokay]]></dc:creator>
		<pubDate>Thu, 08 Jan 2015 09:31:00 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[LINUX Help]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=989</guid>

					<description><![CDATA[<p>Are you looking something like converting your server from virtual server to physical server? This is a complete guide to achieve this. First, we should find the storage on our hypervisor to create an actual clone of our drive and switch the power state off. In my case, i need to find the disk id [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/converting-server-virtual-physical-server/">Converting your server from virtual to physical server</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Are you looking something like converting your server from virtual server to physical server? This is a complete guide to achieve this.</p>
<p>First, we should find the storage on our hypervisor to create an actual clone of our drive and switch the power state off.</p>
<p>In my case, i need to find the disk id from our hypervisor on ‘OnApp’, than i can find the virtual disk with using the disk id.</p>
<p><strong>Step1:</strong></p>
<p>To find disk, you should type something like that;</p>
<p>&nbsp;</p>
<ul>
<li># lvscan | grep &lt;#diskid&gt;</li>
</ul>
<p>Result: # /dev/onapp-xxxxxxxx/abcdef123456</p>
<p><strong>Step2:</strong></p>
<p>Then change the attributes of disk;</p>
<ul>
<li># lvchange -ay /dev/onapp-xxxxxxxx/abcdef123456</li>
</ul>
<p>(a: available)</p>
<p>(y:yes)</p>
<p><strong>Step3:</strong></p>
<p>Create a directory to save your file</p>
<ul>
<li># mkdir /tmp/backup</li>
</ul>
<p><strong>Step4:</strong></p>
<p>Create an .img or .raw file to create your actual copy of your disk.</p>
<ul>
<li># dd if=/dev/onapp-xxxxxxxx/abcdef123456 of=/tmp/backups/backup.raw bs=16M</li>
</ul>
<p><strong>Step5:</strong></p>
<p>Then get your file by using any method. For example: I’m using ‘SecureFX’.</p>
<p><strong>Step6:</strong></p>
<p>Then format your physical drive and burn your image using ‘dd‘ command for Linux or ‘Win32DıskImage’ for Windows.</p>
<p><strong>Step7:</strong> (For Windows)</p>
<p>Install your drive to your physical machine and power on.</p>
<p><strong>Step8:</strong></p>
<p>You should probably get 0xc000000f error or something like that.</p>
<p>To achieve this problem;</p>
<p>Set AHCI Mode in BIOS and use UEFI to unlock your disk.</p>
<p><strong>Step9:</strong></p>
<p>Use your installation DVD/CD and use these commands by using the command prompt and fix your boot problem. Also fix the mbr if needed.</p>
<p>1)chkdsk c: /R</p>
<p>2)bootrec /RebuildBcd</p>
<p>3)bootrec /fixmbr</p>
<p>4)bootrec /fixboot</p>
<p>5)bcdboot c:\Windows /s c:</p>
<p><strong>Step10:</strong></p>
<p>Again turn back to the BIOS and set the boot mode from UEFI to BIOS.</p>
<p>Eject your DVD/CD</p>
<p><strong>Step11:</strong></p>
<p>Voila! Enjoy your one to one copy of your vps .</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/converting-server-virtual-physical-server/">Converting your server from virtual to physical server</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/converting-server-virtual-physical-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">989</post-id>	</item>
		<item>
		<title>Download Plugged.in LAMP installer for CentOS 6.x</title>
		<link>https://www.veriteknik.net.tr/en/plugged-install-lamp-for-centosredhat-6-x-download/</link>
					<comments>https://www.veriteknik.net.tr/en/plugged-install-lamp-for-centosredhat-6-x-download/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Wed, 20 Jun 2012 22:15:06 +0000</pubDate>
				<category><![CDATA[Data Bases]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[LINUX]]></category>
		<category><![CDATA[LINUX Help]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[installer]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[ntpdate]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[rpmforge]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[server]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=568</guid>

					<description><![CDATA[<p>Version Info: V0.2 21/06/2012 DO you ever wanted to set-up a testing server with &#8211; Apache virtual config, logs, paths setted, &#8211; MySQL server with password set, &#8211; FTP Server (Vsftpd), &#8211; PHP and PhpMyAdmin installed &#38; configured on your server or VPS in seconds? If you answer &#8220;yes&#8221; to the question, you are in [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/plugged-install-lamp-for-centosredhat-6-x-download/">Download Plugged.in LAMP installer for CentOS 6.x</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Version Info: V0.2 21/06/2012</p>
<p>DO you ever wanted to set-up a testing server with<br />
&#8211; Apache virtual config, logs, paths setted,<br />
&#8211; MySQL server with password set,<br />
&#8211; FTP Server (Vsftpd),<br />
&#8211; PHP and PhpMyAdmin installed &amp; configured on your server or VPS in seconds?</p>
<p>If you answer &#8220;yes&#8221; to the question, you are in the right place, what does this script do in basic:</p>
<p>&#8211; Installs http, PHP, MySQL, phpMyAdmin, rpmforge repo and other related packages<br />
&#8211; Sets apache configs, mod_deflate, virtual hosts, create user, cgi-bin directory<br />
&#8211; Sets time with ntpdate, disables iptables &amp; selinux, mysql password and<br />
&#8211; Updates the system</p>
<p>What is needed?<br />
&#8211; A clean minimal install of CentOS/Redhat 6.X</p>
<p>How can I download the script?</p>
<pre class="brush: bash; gutter: true; first-line: 1">wget http://www.plugged.in/downloads/plugged.sh</pre>
<p>or just download it.</p>
[wpdm_file id=1]
<p>How to use the script?</p>
<pre class="brush: bash; gutter: true; first-line: 1">chmod 755 plugged.sh
./plugged.sh -u username -p password -d domain.com</pre>
<p>You can reach phpMyAdmin by typing domain.com/phpMyAdmin/</p>
<p>If you have suggestions or requests please write down!</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/plugged-install-lamp-for-centosredhat-6-x-download/">Download Plugged.in LAMP installer for CentOS 6.x</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/plugged-install-lamp-for-centosredhat-6-x-download/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">568</post-id>	</item>
		<item>
		<title>PHP : Convert/Replace Short Open Tags</title>
		<link>https://www.veriteknik.net.tr/en/php-convert-open-tags/</link>
					<comments>https://www.veriteknik.net.tr/en/php-convert-open-tags/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Tue, 19 Jun 2012 11:53:19 +0000</pubDate>
				<category><![CDATA[httpd]]></category>
		<category><![CDATA[LINUX Help]]></category>
		<category><![CDATA[Programmin]]></category>
		<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[tag]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=557</guid>

					<description><![CDATA[<p>Using short open tags, such as &#60;? on your PHP code is not so clever. Other than the debate going on whether short open tags won&#8217;t be available on PHP6 or not, it is possible that your shared hosting has disabled it for some reason, or you might have to migrate your code sometime somewhere [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/php-convert-open-tags/">PHP : Convert/Replace Short Open Tags</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Using short open tags, such as <strong>&lt;?</strong> on your PHP code is not so clever. Other than the debate going on whether short open tags won&#8217;t be available on PHP6 or not, it is possible that your shared hosting has disabled it for some reason, or you might have to migrate your code sometime somewhere it is not supported any longer. For the sake of clean coding, always use clean tags. Other than obeying the standards for technical reasons, it is also essential for developing clean, easy-to-read codes for yourself, other people reading your code or even the IDE/Framework you&#8217;re using!</p>
<p>If somehow, this article is the first place you&#8217;ve realized you should stop using short open tags, it&#8217;s never too late! Below is a find / sed line to convert your php files from short open tags to &#8220;normal&#8221; ones. This line works pretty good but it&#8217;s always a good idea to backup your scripts before doing such massive automated injection.</p>
<pre class="brush: bash; gutter: true; first-line: 1">find . -iname '*.php' -type f -print0 |xargs -0 sed -i -e 's/&lt;? /&lt;?php /g' -e 's/&lt;?\/\//&lt;?php \/\//g' -e 's/&lt;?\/\*/&lt;?php \/\*/g' -e 's/&lt;?\=/&lt;?php echo/g'</pre>
<p>Don&#8217;t forget that this line will look for <strong>*.php</strong> files under the <strong>current</strong> folder due to the <strong>dot</strong> (<strong>.</strong>) which is the first argument of the <strong>find</strong> command.<br />
It will apply these replaces:</p>
<table>
<tbody>
<tr>
<td><strong>From</strong></td>
<td><strong>To</strong></td>
</tr>
<tr>
<td>&lt;?</td>
<td>&lt;?php</td>
</tr>
<tr>
<td>&lt;?//</td>
<td>&lt;?php //</td>
</tr>
<tr>
<td>&lt;?/*</td>
<td>&lt;?php /*</td>
</tr>
<tr>
<td>&lt;?=</td>
<td>&lt;?php echo</td>
</tr>
</tbody>
</table>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/php-convert-open-tags/">PHP : Convert/Replace Short Open Tags</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/php-convert-open-tags/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">557</post-id>	</item>
		<item>
		<title>File Transfer From Windows to Linux via rdesktop</title>
		<link>https://www.veriteknik.net.tr/en/file-transfer-from-windows-to-linux-via-rdesktop/</link>
					<comments>https://www.veriteknik.net.tr/en/file-transfer-from-windows-to-linux-via-rdesktop/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Wed, 30 May 2012 07:48:33 +0000</pubDate>
				<category><![CDATA[LINUX Help]]></category>
		<category><![CDATA[file transfer]]></category>
		<category><![CDATA[rdesktop]]></category>
		<category><![CDATA[remote desktop]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=522</guid>

					<description><![CDATA[<p>rdesktop is the essential tool for Remote Desktop Management of Windows boxes using Linux as your local machine. It is sometimes crucial to be able to transfer files using rdesktop, especially when there isn&#8217;t any FTP service (or equivalent). Luckily rdesktop supports file transfer modes. Before connecting you the Windows box, let&#8217;s make a directory [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/file-transfer-from-windows-to-linux-via-rdesktop/">File Transfer From Windows to Linux via rdesktop</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a title="Rdesktop" href="http://www.rdesktop.org/" target="_blank">rdesktop</a> is the essential tool for Remote Desktop Management of Windows boxes using Linux as your local machine. It is sometimes crucial to be able to transfer files using rdesktop, especially when there isn&#8217;t any FTP service (or equivalent). Luckily rdesktop supports file transfer modes.</p>
<p>Before connecting you the Windows box, let&#8217;s make a directory on your local Linux.</p>
<p><strong> $ mkdir ~/windows</strong></p>
<p>Now, when connecting to Windows, we will use this kind of notation on the rdeskop arguments,</p>
<p><strong> $ rdesktop -f 10.20.30.40 -r disk:linux=/home/eaydin/windows</strong></p>
<p><strong> -f :</strong> this is not of importance in our case, it&#8217;s just for full screen mode, to enter and exit fullscreen mode, press <em>Ctrl+Alt+Enter</em></p>
<p><strong> -r :</strong>  this is the remote share option. disk is one of the options available, this will create a disk on the network devices of the Windows box, named &#8220;<strong>linux</strong>&#8221; which will point to <strong>/home/eaydin/</strong>windows on our Linux box. Don&#8217;t forget that <strong>you need Windows XP and newer</strong> for this feature, and <strong>the device name is limited to 8 characters!</strong></p>
<p>After connecting with these options, on your Windows box (via the rdesktop interface) go to</p>
<p>Network Places -&gt; Entire Network -&gt; Microsoft Terminal Services -&gt; tsclient</p>
<p>Here you&#8217;ll find a device named <strong>linux</strong>, this is your <strong>/home/eaydin/windows</strong> folder!</p>
<p>The <strong>-r</strong> option of rdesktop support many redirections such as <em>sound, printer,  clipboard</em> and more. Check the manual pages for more detail.</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/file-transfer-from-windows-to-linux-via-rdesktop/">File Transfer From Windows to Linux via rdesktop</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/file-transfer-from-windows-to-linux-via-rdesktop/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">522</post-id>	</item>
		<item>
		<title>Password Generation in UNIX</title>
		<link>https://www.veriteknik.net.tr/en/password-generation-in-unix/</link>
					<comments>https://www.veriteknik.net.tr/en/password-generation-in-unix/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Thu, 17 May 2012 09:35:41 +0000</pubDate>
				<category><![CDATA[LINUX Help]]></category>
		<category><![CDATA[Programmin]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[password bash python md5]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=410</guid>

					<description><![CDATA[<p>Below I&#8217;ll describe a couple of nice methods to generate passwords using Python and Bash. Actually there are a lot of ways you can accomplish this especially with bash, but using the /dev/urandom file seems to be the most clever one. The /dev/urandom device doesn&#8217;t only generate read-friendly characters, so it&#8217;s best to filter out [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/password-generation-in-unix/">Password Generation in UNIX</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Below I&#8217;ll describe a couple of nice methods to generate passwords using Python and Bash.</p>
<p>Actually there are a lot of ways you can accomplish this especially with bash, but using the <strong>/dev/urandom</strong> file seems to be the most clever one.</p>
<p>The <strong>/dev/urandom</strong> device doesn&#8217;t only generate read-friendly characters, so it&#8217;s best to filter out the ones we&#8217;d like. The best tool for that would be <strong>tr</strong>.</p>
<p><strong>$ cat /dev/urandom | tr -dc [:alnum:] | head -c 10</strong></p>
<p>This will generate a password from 10 alphanumeric characters.</p>
<p>It will not include some characters though, such as <strong>. ! &#8211; _</strong> which are useful for passwords. So this line would be a little more &#8220;secure&#8221;.</p>
<p><strong>$ cat /dev/urandom | tr -cd &#8220;[:alnum:]\.\-_\!&#8221; | head -c 10<br />
</strong><br />
To generate a password in Python, using the <strong>string</strong> and <strong>random</strong> module would be a clever touch. Let&#8217;s try something like this,</p>
<pre class="brush: python; gutter: true; first-line: 1">&gt;&gt;&gt; import string, random
 &gt;&gt;&gt; def passgen(length) :
 ... keys = list(string.ascii_letters + string.digits)
 ... return "".join(random.choice(keys) for i in range(length)</pre>
<p>With this definition of the passgen function, we can generate alphanumeric passwords with whatever length we want. If you&#8217;d like to include all characters available, try the one below:</p>
<pre class="brush: python; gutter: true; first-line: 1">&gt;&gt;&gt; import string, random
 &gt;&gt;&gt; def passgen(length) :
 ... keys = list(string.ascii_letters + string.digits + ".,;:-_()@\"\\[]?!'^+*$%&amp;/=~`&lt;&gt;|")
 ... return "".join(random.choice(keys) for i in range(length)</pre>
<p>A sample output :</p>
<pre class="brush: python; gutter: true; first-line: 1">&gt;&gt;&gt; passgen(16)
 'pP!3p"(-uxdIqpAK'</pre>
<p>You can find some methods of password generation using MD5 algorithms. For example for password generation in MySQL some people prefer this method;</p>
<p><strong>&gt;SELECT SUBSTRING(MD5(RAND()) FROM 1 FOR 5)</strong></p>
<p>But this will generate very very weak passwords, no uppercase characters and a lot of characters missing, not even to mention the non-alpha numeric characters. Also you&#8217;ll have a limit for maximum character number since the MD5 algorithm has a limit for it. So it&#8217;s best to stay away from the md5 approach for password generation. Some people also use it for bash password generation too (which is wrong! due to same reasons)</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/password-generation-in-unix/">Password Generation in UNIX</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/password-generation-in-unix/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">410</post-id>	</item>
		<item>
		<title>How to Export the Private Key From a .PFX With OpenSSL</title>
		<link>https://www.veriteknik.net.tr/en/how-to-exporting-private-key-from-pfx-with-openssl/</link>
					<comments>https://www.veriteknik.net.tr/en/how-to-exporting-private-key-from-pfx-with-openssl/#respond</comments>
		
		<dc:creator><![CDATA[Cevdet Kaymaz]]></dc:creator>
		<pubDate>Mon, 07 May 2012 13:01:34 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[LINUX Help]]></category>
		<category><![CDATA[export pfx]]></category>
		<category><![CDATA[openssl export]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=388</guid>

					<description><![CDATA[<p>If you have a .pfx file and you need it&#8217;s private.key, then you can use OpenSSL for extracting .pem from .pfx ( the openssl software is available at openssl.org ) To export the private key ( .pem ) from the PFX file and save it to a PEM file : $openssl pkcs12 -in /path/to/file_name.pfx -nocerts [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/how-to-exporting-private-key-from-pfx-with-openssl/">How to Export the Private Key From a .PFX With OpenSSL</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you have  a .pfx file and you need it&#8217;s private.key, then you can use OpenSSL for extracting .pem from .pfx ( the openssl software is available at <a href="http://openssl.org" target="_blank">openssl.org</a> )</p>
<p>To export the private key ( .pem ) from the PFX file and save it to a PEM file :</p>
<blockquote><p>$openssl pkcs12 -in /path/to/file_name.pfx -nocerts -out private_key_name.pem</p></blockquote>
<p>If you want to remove the password from the private key file :</p>
<blockquote><p>$openssl rsa -in private_key_name.pem -out new_private.pem</p></blockquote>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/how-to-exporting-private-key-from-pfx-with-openssl/">How to Export the Private Key From a .PFX With OpenSSL</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/how-to-exporting-private-key-from-pfx-with-openssl/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">388</post-id>	</item>
		<item>
		<title>(Zimbra Mail Server) Unable to determine enabled services from LDAP</title>
		<link>https://www.veriteknik.net.tr/en/zimbra-mail-server-unable-to-determine-enabled-services-from-ldap/</link>
					<comments>https://www.veriteknik.net.tr/en/zimbra-mail-server-unable-to-determine-enabled-services-from-ldap/#respond</comments>
		
		<dc:creator><![CDATA[Cevdet Kaymaz]]></dc:creator>
		<pubDate>Fri, 04 May 2012 13:34:15 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[LINUX Help]]></category>
		<category><![CDATA[ldap service error]]></category>
		<category><![CDATA[service error]]></category>
		<category><![CDATA[zimbra]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=377</guid>

					<description><![CDATA[<p>[zimbra@ck]$ zmcontrol start Host mail.plugged.in Starting ldap&#8230;Done. Unable to determine enabled services from ldap. Enabled services read from cache. Service list may be inaccurate. Starting logger&#8230;Failed. Starting logswatch&#8230;ERROR: service.FAILURE (system failure: ZimbraLdapContext) (cause: javax.net.ssl.SSLHandshakeException sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) zimbra logger service is not enabled! [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/zimbra-mail-server-unable-to-determine-enabled-services-from-ldap/">(Zimbra Mail Server) Unable to determine enabled services from LDAP</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<blockquote>[zimbra@ck]$ zmcontrol start<br />
Host mail.plugged.in<br />
        Starting ldap&#8230;Done.<br />
Unable to determine enabled services from ldap.<br />
Enabled services read from cache. Service list may be inaccurate.<br />
        Starting logger&#8230;Failed.<br />
Starting logswatch&#8230;ERROR: service.FAILURE (system failure: ZimbraLdapContext) (cause: javax.net.ssl.SSLHandshakeException sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target)<br />
zimbra logger service is not enabled!  failed.</p></blockquote>
<p>The usual reason for this error is expired an SSL certificate.</p>
<p><span id="more-377"></span><br />
This error usually happens if your SSL certificate has expired. There are two solutions for this problem.</p>
<p><strong>The first solution is renewing your certificate and deploying it with the following command :</strong></p>
<p>&nbsp;</p>
<blockquote>[zimbra@ck]$ /opt/zimbra/bin/zmcertmgr deploycrt comm /opt/zimbra/ssl/zimbra/commercial/your_new_ssl.crt /path/to/ca_bundle.crt</p></blockquote>
<p>After this you need to restart zmcontrol.</p>
<p><strong>The second solution is regenerating self-signed certificate.</strong></p>
<blockquote>[zimbra@ck]$ su &#8211; zimbra -c &#8216;zmcontrol stop&#8217;<br />
[zimbra@ck]$ rm -rf /opt/zimbra/ssl/*<br />
[zimbra@ck]$ rm -rf /opt/zimbra/ssl/.rnd<br />
[zimbra@ck]$ /opt/zimbra/java/bin/keytool -delete -alias my_ca -keystore /opt/zimbra/java/jre/lib/security/cacerts -storepass changeit<br />
[zimbra@ck]$ /opt/zimbra/java/bin/keytool -delete -alias jetty -keystore /opt/zimbra/mailboxd/etc/keystore -storepass `su &#8211; zimbra -c &#8216;zmlocalconfig -s -m nokey mailboxd_keystore_password&#8217;`</p></blockquote>
<p>Then you need to edit  /opt/zimbra/bin/zmcertmgr file ( you can use &#8216;vi&#8217; )</p>
<p>Find validation_days=365 and change to validation_days=3650</p>
<p>And save /opt/zimbra/bin/zmcertmgr</p>
<blockquote>[zimbra@ck]$ /opt/zimbra/bin/zmcertmgr createca -new<br />
[zimbra@ck]$ /opt/zimbra/bin/zmcertmgr deployca -localonly<br />
[zimbra@ck]$ /opt/zimbra/bin/zmcertmgr createcrt self -new<br />
[zimbra@ck]$ /opt/zimbra/bin/zmcertmgr deploycrt self</p>
[zimbra@ck]$ su &#8211; zimbra -c &#8216;zmcontrol start&#8217;</p>
[zimbra@ck]$ /opt/zimbra/bin/zmcertmgr deploycrt self<br />
[zimbra@ck]$ /opt/zimbra/bin/zmcertmgr deployca</p>
[zimbra@ck]$ su &#8211; zimbra -c &#8216;zmupdateauthkeys&#8217;<br />
[zimbra@ck]$ /opt/zimbra/bin/zmcertmgr viewdeployedcrt</p></blockquote>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/zimbra-mail-server-unable-to-determine-enabled-services-from-ldap/">(Zimbra Mail Server) Unable to determine enabled services from LDAP</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/zimbra-mail-server-unable-to-determine-enabled-services-from-ldap/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">377</post-id>	</item>
		<item>
		<title>How to grep Compressed Files?</title>
		<link>https://www.veriteknik.net.tr/en/how-to-grep-compressed-files-over-ssh/</link>
					<comments>https://www.veriteknik.net.tr/en/how-to-grep-compressed-files-over-ssh/#respond</comments>
		
		<dc:creator><![CDATA[Cevdet Kaymaz]]></dc:creator>
		<pubDate>Mon, 30 Apr 2012 14:04:31 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[LINUX Help]]></category>
		<category><![CDATA[bzgrep]]></category>
		<category><![CDATA[compressed]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[grep compressed file]]></category>
		<category><![CDATA[inside]]></category>
		<category><![CDATA[tar]]></category>
		<category><![CDATA[zgrep]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=361</guid>

					<description><![CDATA[<p>Sometimes you need to search the contents of .gz files in your system. Unfortunately, grep doesn&#8217;t work on compressed files. To overcome this, people usually advise to first  uncompress the file(s), and then grep your text, after that finally re-compress your file(s)&#8230; You don&#8217;t need to uncompress them in the first place. You can use [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/how-to-grep-compressed-files-over-ssh/">How to grep Compressed Files?</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Sometimes you need to search the contents of .gz files in your system. Unfortunately, grep doesn&#8217;t work on compressed files. To overcome this, people usually advise to first  uncompress the file(s), and then grep your text, after that finally re-compress your file(s)&#8230;</p>
<p>You don&#8217;t need to uncompress them in the first place. You can use <strong>zgrep</strong> on compressed or gzipped files.</p>
<p><span id="more-361"></span></p>
<p>To search in compressed file, execute the command :<br />
<strong>root@ck [~]#zgrep &#8216;put-your-text-here&#8217; /your-file-path-here/file.gz</strong><br />
Example : I want to grep &#8216;plugged&#8217; in all of my exim_paniclog archived files.<br />
<strong>root@ck [~]# zgrep &#8216;plugged&#8217; /var/log/exim_paniclog.*</strong></p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/how-to-grep-compressed-files-over-ssh/">How to grep Compressed Files?</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/how-to-grep-compressed-files-over-ssh/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">361</post-id>	</item>
		<item>
		<title>How to clear contents of a file ?</title>
		<link>https://www.veriteknik.net.tr/en/how-to-clear-contents-of-a-file/</link>
					<comments>https://www.veriteknik.net.tr/en/how-to-clear-contents-of-a-file/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Wed, 25 Apr 2012 11:49:50 +0000</pubDate>
				<category><![CDATA[LINUX Help]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=341</guid>

					<description><![CDATA[<p>If you want to clear contents of a file in unix, you could just delete the file and recreate it. But there are much more simple alternatives. You can use echo method. To empty a file just enter the command below. I use my php_error.log file for example. echo -n &#62; /home/base/logs/php_error.log That&#8217;s it. Your [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/how-to-clear-contents-of-a-file/">How to clear contents of a file ?</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you want to clear contents of a file in unix, you could just delete the file and recreate it.</p>
<p>But there are much more simple alternatives.</p>
<p><strong>You can use echo method.</strong></p>
<p>To empty a file just enter the command below. I use my php_error.log file for example.</p>
<blockquote><p>echo -n &gt; /home/base/logs/php_error.log</p></blockquote>
<p>That&#8217;s it. Your file is empty now.</p>
<p><strong>You can use VI Editor.</strong></p>
<p>First, open the file that you want to empty with vi editor. I use my php_error.log file for example.</p>
<blockquote>
<div>vi /home/base/logs/php_error.log</div>
</blockquote>
<p>On the first line, type<strong> &#8220;dG&#8221;</strong> without quotes. It means delete globally on VI Editor.</p>
<p>Then quit with &#8220;:wq&#8221; without quotes of course 🙂</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/how-to-clear-contents-of-a-file/">How to clear contents of a file ?</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/how-to-clear-contents-of-a-file/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">341</post-id>	</item>
	</channel>
</rss>
