IT headaches http://itheadaches.com IT solutions for IT headaches Wed, 24 Jul 2019 07:29:05 +0000 en-US hourly 1 https://i1.wp.com/itheadaches.com/wp-content/uploads/2014/09/fav.png?fit=32%2C21 IT headaches http://itheadaches.com 32 32 34475025 Run composer with php 7.3 on cpanel http://itheadaches.com/run-composer-with-php-7-3-on-cpanel/ http://itheadaches.com/run-composer-with-php-7-3-on-cpanel/#respond Wed, 24 Jul 2019 07:28:47 +0000 http://itheadaches.com/?p=2214 ]]> /opt/cpanel/ea-php73/root/usr/bin/php -d allow_url_fopen=1 -d zend.detect_unicode=0 $(which composer) update

]]>
http://itheadaches.com/run-composer-with-php-7-3-on-cpanel/feed/ 0 2214
Monitoring response-time via nsclient++ http://itheadaches.com/monitoring-response-time-via-nsclient/ http://itheadaches.com/monitoring-response-time-via-nsclient/#respond Tue, 08 Jan 2019 09:51:05 +0000 http://itheadaches.com/?p=2201 ]]> setup remote ping check

Monitoring response-time via NSClient++

Add a command to NSClient++’s configuration file custom.ini:
command[check_ping]=C:\plugins\check_ping.exe -H $ARG1$ -w $ARG2$ -c $ARG3$

Add a command to NSClient++’s configuration file op5.ini

check_ping = cmd /c scripts\op5\check_ping.exe -H $ARG1$ -w $ARG2$ -c $ARG3$

]]>
http://itheadaches.com/monitoring-response-time-via-nsclient/feed/ 0 2201
Shibboleth opensaml – FatalProfileException – Message was signed, but signature could not be verified http://itheadaches.com/shibboleth-opensaml-fatalprofileexception-message-signed-signature-verified/ http://itheadaches.com/shibboleth-opensaml-fatalprofileexception-message-signed-signature-verified/#respond Wed, 28 Nov 2018 01:26:14 +0000 http://itheadaches.com/?p=2184 […]]]> Client asked to update our cert to their adfs. Couldn’t find a good way to troubleshoot this using google so started to examine all the configuration files in /etc/shibboleth.

Led me to federationmetadata.xml.

Found section keydescriptor that looked like a certificate so I added a new section with the new cert.

<KeyDescriptor use="signing">
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<X509Data>
<X509Certificate>MII......hidden......</X509Certificate>
</X509Data>
</KeyInfo>
</KeyDescriptor>

]]>
http://itheadaches.com/shibboleth-opensaml-fatalprofileexception-message-signed-signature-verified/feed/ 0 2184
Install latest version of mtr for MAC users http://itheadaches.com/install-latest-version-mtr-mac-users/ http://itheadaches.com/install-latest-version-mtr-mac-users/#respond Tue, 10 Oct 2017 01:05:35 +0000 http://itheadaches.com/?p=2155 ]]> Must have brew

brew install mtr –HEAD

]]>
http://itheadaches.com/install-latest-version-mtr-mac-users/feed/ 0 2155
NI OS 06.0.00d for Brocade MLXe and NetIron – 20 July 2017 http://itheadaches.com/ni-os-06-0-00d-brocade-mlxe-netiron-20-july-2017/ http://itheadaches.com/ni-os-06-0-00d-brocade-mlxe-netiron-20-july-2017/#respond Tue, 12 Sep 2017 22:18:15 +0000 http://itheadaches.com/?p=2145 ]]> netironunified_06000d_releasenotes_v2

]]>
http://itheadaches.com/ni-os-06-0-00d-brocade-mlxe-netiron-20-july-2017/feed/ 0 2145
SSL/TLS Strong Encryption: How-To http://itheadaches.com/ssltls-strong-encryption/ http://itheadaches.com/ssltls-strong-encryption/#respond Sun, 23 Jul 2017 23:11:13 +0000 http://itheadaches.com/?p=2131 […]]]> https://httpd.apache.org/docs/trunk/ssl/ssl_howto.html

# "Modern" configuration, defined by the Mozilla Foundation's SSL Configuration
# Generator as of August 2016. This tool is available at
# https://mozilla.github.io/server-side-tls/ssl-config-generator/
SSLProtocol         all -SSLv3 -TLSv1 -TLSv1.1
# Many ciphers defined here require a modern version (1.0.1+) of OpenSSL. Some
# require OpenSSL 1.1.0, which as of this writing was in pre-release.
SSLCipherSuite      ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
SSLHonorCipherOrder on
SSLCompression      off
SSLSessionTickets   off

 

]]>
http://itheadaches.com/ssltls-strong-encryption/feed/ 0 2131
ntpq -pn http://itheadaches.com/ntpq-pn/ http://itheadaches.com/ntpq-pn/#respond Thu, 15 Jun 2017 02:23:07 +0000 http://itheadaches.com/?p=2123 […]]]> root@netbox:~# ntpq -pn remote refid st t when poll reach delay offset jitter ============================================================================== -67.198.200.4 69.89.207.199 3 u 30 64 1 1.182 -0.029 0.000 +216.239.35.0 .GOOG. 1 u 20 64 1 52.571 0.660 0.240 +216.239.35.4 .GOOG. 1 u 20 64 1 36.033 1.016 0.176 -216.239.35.8 .GOOG. 1 u 24 64 1 140.712 1.154 0.286 *216.239.35.12 .GOOG. 1 u 23 64 1 126.636 1.082 0.233

 

]]>
http://itheadaches.com/ntpq-pn/feed/ 0 2123
Sigh – Sonicwall – Trying to export settings http://itheadaches.com/sigh-sonicwall-trying-export-settings/ http://itheadaches.com/sigh-sonicwall-trying-export-settings/#respond Wed, 14 Jun 2017 04:05:11 +0000 http://itheadaches.com/?p=2109 ]]> Use Firefox and you’ll be able to download the file.

]]>
http://itheadaches.com/sigh-sonicwall-trying-export-settings/feed/ 0 2109
Download speed test IAD2 http://itheadaches.com/download-speed-test-iad2/ http://itheadaches.com/download-speed-test-iad2/#respond Wed, 14 Jun 2017 04:03:04 +0000 http://itheadaches.com/?p=2106 ]]> http://67.198.232.40/speedtest/

]]>
http://itheadaches.com/download-speed-test-iad2/feed/ 0 2106
Nimblestorage Replication Ports http://itheadaches.com/nimblestorage-replication-ports/ http://itheadaches.com/nimblestorage-replication-ports/#respond Fri, 19 May 2017 08:03:06 +0000 http://itheadaches.com/?p=2098 ]]> Need ports TCP 4213, 4214

]]>
http://itheadaches.com/nimblestorage-replication-ports/feed/ 0 2098
Magento 1.9.3.1 – Add images/icons to attribute options to replace placeholder image of your Magento products page http://itheadaches.com/magento-1-9-3-1-add-imagesicons-attribute-options-magento-products-page-view-phtml/ http://itheadaches.com/magento-1-9-3-1-add-imagesicons-attribute-options-magento-products-page-view-phtml/#respond Mon, 27 Feb 2017 02:01:20 +0000 http://itheadaches.com/?p=2074 […]]]> magento 1.9.3.1


view.phtml around line 100 replace the if statement

<?php if($_item->getColor()): ?>

<?php
$optionId = $_item->getColor();
$optionIdurl = Mage::helper('attributeoptionimage')->getAttributeOptionImage($optionId)
?>

<a href="#" class="color_swatch">

<?php if (strpos( $this->helper('catalog/image')->init($_item, 'small_image')->resize(100, 150), 'placeholder')) {
?>
<img src="<?php echo $optionIdurl; ?>" />
<?php
} else {
?>
<img src="<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(100, 150); ?>" />
<?php } ?>

<?php endif; ?>

 

reference:
http://www.bubblecode.net/en/2012/02/05/magento-add-images-to-product-attribute-options/

https://github.com/aligent/magento-attribute-option-image

]]>
http://itheadaches.com/magento-1-9-3-1-add-imagesicons-attribute-options-magento-products-page-view-phtml/feed/ 0 2074
Juniper SSG using old ssl encryption http://itheadaches.com/juniper-ssg-using-old-ssl-encryption/ http://itheadaches.com/juniper-ssg-using-old-ssl-encryption/#respond Wed, 01 Feb 2017 02:55:59 +0000 http://itheadaches.com/?p=2071 ]]> set ssl encrypt 3des sha-1

]]>
http://itheadaches.com/juniper-ssg-using-old-ssl-encryption/feed/ 0 2071
30 hilarious wi-fi network names http://itheadaches.com/30-hilarious-wi-fi-network-names/ http://itheadaches.com/30-hilarious-wi-fi-network-names/#respond Thu, 20 Oct 2016 14:34:37 +0000 http://itheadaches.com/?p=2063 ]]>

30 Hilarious Wi-Fi Network Names We All Want Passwords To

]]>
http://itheadaches.com/30-hilarious-wi-fi-network-names/feed/ 0 2063
install redis on centos7 for magento2 http://itheadaches.com/install-redis-centos7-magento2/ http://itheadaches.com/install-redis-centos7-magento2/#respond Sun, 17 Jul 2016 21:52:16 +0000 http://itheadaches.com/?p=2059 ]]>

How to Install Redis Server on CentOS 7

 

http://redis.io/topics/quickstart

 

]]>
http://itheadaches.com/install-redis-centos7-magento2/feed/ 0 2059
some backup links using rsync http://itheadaches.com/backup-links-using-rsync/ http://itheadaches.com/backup-links-using-rsync/#respond Mon, 11 Jul 2016 00:31:41 +0000 http://itheadaches.com/?p=2053 […]]]> https://github.com/elkarbackup/elkarbackup

ElkarBackup is a free open-source backup solution based on RSync/RSnapshot

Automated Rsync Backup

 

Here’s how to setup an automated backup process using Rsync.

1. Test rysnc using a password. Here we will be copying files from /src-dir to /dest-dir on username@home.

1
> rsync -rvz -e 'ssh -p 22' --progress /src-dir username@host:/dest-dir

2. Now let’s automate Rsync. Create the public and private keys on the source machine.

1
 > ssh-keygen

3. Copy the public key to username’s ~/.ssh/authorized_keys file in the destination machine.

1
 > ssh-copy-id "username@host -p 22"

4. Test SSH using key authentication.

1
> ssh "username@host -p 22"

5. Test Rsync using key authentication.

1
> rsync -rvz -e 'ssh -p 22' --progress /src-dir username@host:/dest-dir

6. Add Rsync to daily cron.

1
2
3
> cd /etc/cron.daily/
> echo 'rsync -rz -e "ssh -p 22" /src-dir username@host:/dest-dir' >> rsync.cron
> chmod u+x rsync.cron

7. In case you want to use a password instead (not recommended), you can use sshpass.

1
> rsync -rvz -e 'sshpass -p password ssh -l username -p 22' --progress /src-dir username@host:/dest-dir

 

]]>
http://itheadaches.com/backup-links-using-rsync/feed/ 0 2053
2.5″ and 3.5″ drive screws http://itheadaches.com/2-5-3-5-drive-screws/ http://itheadaches.com/2-5-3-5-drive-screws/#respond Tue, 10 May 2016 02:17:58 +0000 http://itheadaches.com/?p=2028 ]]>

Notice the threads are different

image

]]>
http://itheadaches.com/2-5-3-5-drive-screws/feed/ 0 2028
Percona cluster failed http://itheadaches.com/percona-cluster-failed/ http://itheadaches.com/percona-cluster-failed/#respond Wed, 27 Apr 2016 01:32:47 +0000 http://itheadaches.com/?p=2023 […]]]> one of the nodes failed then the whole cluster went down.

shutdown mysql on all nodes

cat /var/lib/mysql/grastate.dat

check which node has the highest seq number

boot strap that node

service mysql bootstrap-pxc

then start the next node but before that

mv /var/lib/mysql/grastate.dat ~

service mysql start

this will start a full resync

wait till it finishes then start the same process on the next node.

 

https://www.percona.com/doc/percona-xtradb-cluster/5.5/manual/bootstrap.html

]]>
http://itheadaches.com/percona-cluster-failed/feed/ 0 2023
Cloudrouter 3.0 eval http://itheadaches.com/cloudrouter-3-0-eval/ http://itheadaches.com/cloudrouter-3-0-eval/#respond Tue, 26 Apr 2016 03:35:34 +0000 http://itheadaches.com/?p=2012 ]]> trying out cloudrouter 3.0.

Doesn’t seem like much of a router when it doesn’t have dhcp.

How To Install DHCP Server on CentOS 7

https://devops.profitbricks.com/tutorials/deploy-outbound-nat-gateway-on-centos-7/

 

 

 

 

 

]]>
http://itheadaches.com/cloudrouter-3-0-eval/feed/ 0 2012
good ubuntu software raid1 guide http://itheadaches.com/good-ubuntu-software-raid1-guide/ http://itheadaches.com/good-ubuntu-software-raid1-guide/#respond Fri, 22 Apr 2016 09:14:33 +0000 http://itheadaches.com/?p=2001 ]]>

Installing Ubuntu 14.04 on RAID 1 and LVM

 

]]>
http://itheadaches.com/good-ubuntu-software-raid1-guide/feed/ 0 2001
WTF – VMware Update Manager 6.0 Install http://itheadaches.com/wtf-vmware-update-manager-6-0-install/ http://itheadaches.com/wtf-vmware-update-manager-6-0-install/#respond Thu, 07 Apr 2016 17:39:47 +0000 http://itheadaches.com/?p=1993 […]]]> I remember installing this was much easier back in da day….

First problem

Trying to find vmware update manager. There is no download link for it on vmware website. After much searching you’ll find it in the vcenter iso.

Second problem

.net 3.5 sp1 installation in windows 2012 can only be done through server manager. This is a big WTF. If your server isn’t online you need to run some command line that downloads it from a mounted windows 2012 iso. My server was having problems updating because of some firewall policies. Took a long time to figure this out.

Third problem

installing update manager needs a ODBC connection. I remember in the past it would install sql express but now you gotta do everything manually. Had to download sqlexpress. I downloaded 2014 microsoft sql express 64 and then needed sql server management studio to create a database. Well VUM doesn’t support 64-bit, you need to setup a 32-bit sql. And 32-bit mssql only works with 32-it sql server management studio. Finally after setting up ODBC I was able to complete the install.

Fourth problem

yes last problem. after all was said and done, vum service wasn’t talking to the database properly. The error didn’t say it couldn’t talk to database so couldn’t figure out for a while was wrong. I was looking up a bunch of stuff that didn’t help. Finally decided to look at event viewer. I should’ve done this first. Found that the SQL user SYSTEM was trying to access the db no permissions. I went to service manager and changed in properties, login as the administrator.

DONE

 

]]>
http://itheadaches.com/wtf-vmware-update-manager-6-0-install/feed/ 0 1993
Python setting up eclipse http://itheadaches.com/python-setting-eclipse/ http://itheadaches.com/python-setting-eclipse/#respond Mon, 04 Apr 2016 07:58:03 +0000 http://itheadaches.com/?p=1988 ]]> kinda old article but mostly worked. http://blog.manbolo.com/2013/02/04/how-to-install-python-3-and-pydev-on-osx

to update java on Mac

used this http://stackoverflow.com/questions/24342886/how-to-install-java-8-on-mac

 

i installed minimal eclipse install and then added pydev

]]>
http://itheadaches.com/python-setting-eclipse/feed/ 0 1988
Shitty documentation installing magmi http://itheadaches.com/shitty-documentation-installing-magmi/ http://itheadaches.com/shitty-documentation-installing-magmi/#respond Mon, 04 Apr 2016 00:08:20 +0000 http://itheadaches.com/?p=1983 ]]> When you install magmi and you access magmi/web/magmi.php initial login/pass will be “magmi/magmi”. After you setup db connection info it will use magento back office login/password.

create magmi/.htaccess

Order deny,allow
Deny from all

then create magmi/web/.htaccess

Order allow,deny
Allow from all
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.+)$
RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

]]>
http://itheadaches.com/shitty-documentation-installing-magmi/feed/ 0 1983
Add passphrase to private key http://itheadaches.com/add-passphrase-private-key/ http://itheadaches.com/add-passphrase-private-key/#respond Tue, 29 Mar 2016 21:02:10 +0000 http://itheadaches.com/?p=1979 […]]]> You can still add a passphrase to a private key even after a certificate is generated.

openssl rsa -des3 -in your.key -out your.encrypted.key

mv your.encrypted.key your.key

the -des3 tells openssl to encrypt the key with DES3.

remove it

openssl rsa -in your.key -out your.open.key

you will be asked for your passphrase one last time by omitting the -des3 you tell openssl to not encrypt the output.

mv your.open.key your.key

 

http://security.stackexchange.com/questions/59136/can-i-add-a-password-to-an-existing-private-key

]]>
http://itheadaches.com/add-passphrase-private-key/feed/ 0 1979
How to install magmi http://itheadaches.com/how-to-install-magmi/ http://itheadaches.com/how-to-install-magmi/#respond Tue, 29 Mar 2016 08:44:55 +0000 http://itheadaches.com/?p=1967 ]]> extract magmi to your magento folder

go to magmi/web/

create htpasswd using ‘/usr/local/apache/bin/htpasswd -c .htpasswd itheadaches’

set owner to files ‘chown -R fill4style.fill4style itheadaches’

set permission to files

install php-mbstring, in my case I had to recompile apache with mbstring

 

 

]]>
http://itheadaches.com/how-to-install-magmi/feed/ 0 1967
FUCK: syntax error in /etc/sudoers file http://itheadaches.com/fuck-syntax-error-etcsudoers-file/ http://itheadaches.com/fuck-syntax-error-etcsudoers-file/#respond Sat, 26 Mar 2016 03:02:21 +0000 http://itheadaches.com/?p=1959 […]]]> rypt@jump1:~$ sudo >>> /etc/sudoers: syntax error near line 33 <<< sudo: parse error in /etc/sudoers near line 33 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin

 

rypt@jump1:~$ pkexec visudo -f /etc/sudoers
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/usr/sbin/visudo' as the super user
Multiple identities can be used for authentication:
 1.  Admin User,,, (adminuser)
 2.  ,,, (krypt)
Choose identity to authenticate as (1-2): 2
Password:
==== AUTHENTICATION COMPLETE ===

 

]]>
http://itheadaches.com/fuck-syntax-error-etcsudoers-file/feed/ 0 1959
svchost.exe high cpu on windows 7 http://itheadaches.com/svchost-exe-high-cpu-windows-7/ http://itheadaches.com/svchost-exe-high-cpu-windows-7/#respond Mon, 21 Mar 2016 21:23:48 +0000 http://itheadaches.com/?p=1956 […]]]> svchost.exe high cpu on windows 7

used process explorer to figure out what service is taking up all the cpu. process explorer is a free tool from microsoft.

found it was dnscache.

read here to try disabling the dns service. I disabled the service and DNS resolution was working, but after a while it would stop and after reboots it wasn’t working either. Found at the bottom of the forum that processing the hosts file is what’s causing the slow down. Even though my hosts file had some entires from spybot it wasn’t huge. I replaced c:\windows\system32\drivers\etc\hosts with an empty and cpu usage was back to normal.

 

]]>
http://itheadaches.com/svchost-exe-high-cpu-windows-7/feed/ 0 1956
Pagespeed higher score for magento with cache-control http://itheadaches.com/pagespeed-higher-score-magento/ http://itheadaches.com/pagespeed-higher-score-magento/#respond Mon, 21 Mar 2016 02:47:00 +0000 http://itheadaches.com/?p=1945 […]]]> Add this at the end of .htaccess file

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 week"
ExpiresByType image/jpeg "access 1 week"
ExpiresByType image/gif "access 1 week"
ExpiresByType image/png "access 1 week"
ExpiresByType text/css "access 1 week"
ExpiresByType application/pdf "access 1 week"
ExpiresByType application/javascript "access 1 week"
ExpiresByType application/x-javascript "access 1 week"
ExpiresByType application/x-shockwave-flash "access 1 week"
ExpiresByType image/x-icon "access 1 week"
ExpiresDefault "access 1 week"
</IfModule>
<IfModule mod_headers.c>
 <FilesMatch ".(js|css|xml|gz|html)$">
   Header append Vary: Accept-Encoding
 </FilesMatch>
Header set Connection keep-alive
</IfModule>
## EXPIRES CACHING ##

 

 

]]>
http://itheadaches.com/pagespeed-higher-score-magento/feed/ 0 1945
Create Download CMS Page on OpenCart 2.x Quick and Dirty http://itheadaches.com/create-download-cms-page-opencart-2-x-quick-dirty/ http://itheadaches.com/create-download-cms-page-opencart-2-x-quick-dirty/#respond Mon, 21 Mar 2016 02:42:54 +0000 http://itheadaches.com/?p=1936 […]]]> ~/www/catalog/view/theme/default/template/download/download.tpl

 

<?php echo $header; ?>
<?php echo $content_top; ?>
<div class="container">
 <div class="row"><?php echo $column_left; ?>
   <?php if ($column_left && $column_right) { ?>
   <?php $class = 'col-sm-6'; ?>
   <?php } elseif ($column_left || $column_right) { ?>
   <?php $class = 'col-sm-9'; ?>
   <?php } else { ?>
   <?php $class = 'col-sm-12'; ?>
   <?php } ?>
   <div id="content" class="<?php echo $class; ?>"><?php
//echo $my_custom_text;
//      var_dump ($download_result);
if ($download_result->num_rows > 0) {
   // output data of each row
   foreach ($download_result as $row){
       if ($row["download_id"]) {
       echo "<div class='download'>ID: " . $row["download_id"]. " - <a href='/system/download/" . $row["filename"]. "'>Download: " . $row["mask"] . "</a></div><br>";
       }
   }
} else {
   echo "0 results";
}
?><?php echo $content_bottom; ?></div>
   <?php echo $column_right; ?></div>
</div>
<?php echo $footer; ?>

~/www/catalog/controller/download/download.php

<?php
class ControllerDownloadDownload extends Controller {
public function index() {
// set title of the page
$this->document->setTitle("My Download Page");

// define children templates
$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
$data['content_bottom'] = $this->load->controller('common/content_bottom');
$data['footer'] = $this->load->controller('common/footer');
$data['header'] = $this->load->controller('common/header');

// set data to the variable
$data['my_custom_text'] = "This is my custom page.";
   $sql = "SELECT * FROM oc_download";
   $download_result = $this->db->query($sql);
//      var_dump ($download_result);
       $data['download_result'] = $download_result;

// call the "View" to render the output
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/download/download.tpl')) {
$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/download/download.tpl', $data));
} else {
$this->response->setOutput($this->load->view('default/template/download/download.tpl', $data));
}
}
}
?>

go to http://icetrousa.com/index.php?route=download/download

reference:

http://code.tutsplus.com/articles/from-beginner-to-advanced-opencart-more-about-mvc–cms-21737

http://code.tutsplus.com/tutorials/create-a-custom-page-in-opencart–cms-22054 – read comments for 2.x

]]>
http://itheadaches.com/create-download-cms-page-opencart-2-x-quick-dirty/feed/ 0 1936
image/gif was stretched even though width/height was set http://itheadaches.com/imagegif-stretched-even-though-widthheight-set/ http://itheadaches.com/imagegif-stretched-even-though-widthheight-set/#respond Mon, 29 Feb 2016 00:26:29 +0000 http://itheadaches.com/?p=1928 ]]> Use object-fit:contain in CSS styles to contain image inside width/height.

<div class=”swatch-loader” style=”text-align:center;”><img src=”<?php echo $this->getSkinUrl(‘images/ajaxcartpopup/loading.gif’);?>” width=”17″ height=”17″ style=”object-fit:contain;display:inline;” /></div>

]]>
http://itheadaches.com/imagegif-stretched-even-though-widthheight-set/feed/ 0 1928
[Prestashop] How to fix edit product and delete product in back office order http://itheadaches.com/prestashop-fix-edit-product-delete-product-back-office-order/ http://itheadaches.com/prestashop-fix-edit-product-delete-product-back-office-order/#respond Mon, 29 Feb 2016 00:12:34 +0000 http://itheadaches.com/?p=1919 […]]]> Test should work for any 1.6.x.x, but only tested on 1.6.0.9, 1.6.0.11, and 1.6.1.4

There is a problem with the token. orders.js is the new file and orders.js.bak is the original js file. You will see the token is pulled from the url/href.

root@cpanel5 [/home/bozzolo/www]# diff js/admin/orders.js js/admin/orders.js.bak
595c595
< 				token: window.location.href.split('token=')[1].split("&")[0],
---
> 				token: token,
685c685
< 			query = 'ajax=1&token='+window.location.href.split('token=')[1].split("&")[0]+'&action=editProductOnOrder&id_order='+id_order+'&';
---
> 			query = 'ajax=1&token='+token+'&action=editProductOnOrder&id_order='+id_order+'&';
762c762
< 		var query = 'ajax=1&action=deleteProductLine&token='+window.location.href.split('token=')[1].split("&")[0]+'&id_order_detail='+id_order_detail+'&id_order='+id_order;
---
> 		var query = 'ajax=1&action=deleteProductLine&token='+token+'&id_order_detail='+id_order_detail+'&id_order='+id_order;

 

Fix for this: Can’t edit/add ordered products in an order page

]]>
http://itheadaches.com/prestashop-fix-edit-product-delete-product-back-office-order/feed/ 0 1919
Github Resource interpreted as javascript but transferred with MIME type text/plain. http://itheadaches.com/github-resource-interpreted-javascript-transferred-mime-type-textplain/ http://itheadaches.com/github-resource-interpreted-javascript-transferred-mime-type-textplain/#respond Mon, 15 Feb 2016 02:06:16 +0000 http://itheadaches.com/?p=1914 ]]> http://stackoverflow.com/questions/17341122/link-and-execute-external-javascript-file-hosted-on-github

]]>
http://itheadaches.com/github-resource-interpreted-javascript-transferred-mime-type-textplain/feed/ 0 1914
Using tftpserver on mac os x. Figuring out how to upload file to tftpserver http://itheadaches.com/using-tftpserver-mac-os-x-figuring-upload-file-tftpserver/ http://itheadaches.com/using-tftpserver-mac-os-x-figuring-upload-file-tftpserver/#respond Sun, 14 Feb 2016 01:46:39 +0000 http://itheadaches.com/?p=1910 ]]> I downloaded tftpserver for mac os x from here.

It uses /private/tftpboot as the path. go to console and type chmod 777 /private/tftpboot

when you try to upload a file you will get access violation. You must first create the file so it can be overwritten.

]]>
http://itheadaches.com/using-tftpserver-mac-os-x-figuring-upload-file-tftpserver/feed/ 0 1910
[ERROR] WSREP: failed to open gcomm backend connection: 131: invalid UUID: 00000000 (FATAL) at gcomm/src/pc.cpp:PC():271 http://itheadaches.com/error-wsrep-failed-open-gcomm-backend-connection-131-invalid-uuid-00000000-fatal-gcommsrcpc-cpppc271/ http://itheadaches.com/error-wsrep-failed-open-gcomm-backend-connection-131-invalid-uuid-00000000-fatal-gcommsrcpc-cpppc271/#respond Mon, 11 Jan 2016 05:47:52 +0000 http://itheadaches.com/?p=1903 ]]> Headache: [ERROR] WSREP: failed to open gcomm backend connection: 131: invalid UUID: 00000000 (FATAL)
at gcomm/src/pc.cpp:PC():271

Solution:

rename /var/lib/mysql/gvwstate.dat to /var/lib/mysql/gvwstate.dat.bak

service mysql start

https://github.com/codership/galera/issues/354

]]>
http://itheadaches.com/error-wsrep-failed-open-gcomm-backend-connection-131-invalid-uuid-00000000-fatal-gcommsrcpc-cpppc271/feed/ 0 1903
how to delete huge file in mariadb/mysql that start with pound # http://itheadaches.com/delete-huge-file-mariadbmysql-start-pound/ http://itheadaches.com/delete-huge-file-mariadbmysql-start-pound/#respond Mon, 09 Nov 2015 05:45:59 +0000 http://itheadaches.com/?p=1894 ]]> -rw-rw---- 1 kolbe kolbe 8.4K Mar 26 17:57 #sql-f3be_1.frm -rw-rw---- 1 kolbe kolbe 24M Mar 26 17:57 #sql-f3be_1.ibd

https://mariadb.com/blog/get-rid-orphaned-innodb-temporary-tables-right-way

]]>
http://itheadaches.com/delete-huge-file-mariadbmysql-start-pound/feed/ 0 1894
mariadb ibdata1 file huge http://itheadaches.com/mariadb-ibdata1-file-huge/ http://itheadaches.com/mariadb-ibdata1-file-huge/#respond Mon, 09 Nov 2015 05:34:37 +0000 http://itheadaches.com/?p=1886 ]]> http://pc-freak.net/blog/fix-mysql-ibdata-file-size-ibdata1-file-growing-large-preventing-ibdata1-eating-disk-space/

http://vdachev.net/2007/02/22/mysql-reducing-ibdata1/

]]>
http://itheadaches.com/mariadb-ibdata1-file-huge/feed/ 0 1886
How to check if you are running in a VM in linux http://itheadaches.com/1879-2/ http://itheadaches.com/1879-2/#respond Fri, 30 Oct 2015 18:20:09 +0000 http://itheadaches.com/?p=1879 ]]> On Linux you can use the command virt-what

[root@myhost]# virt-what
vmware

 

]]>
http://itheadaches.com/1879-2/feed/ 0 1879
Magento – Menu toggle dropdown broken in left column http://itheadaches.com/magento-menu-toggle-dropdown-broken-left-column/ http://itheadaches.com/magento-menu-toggle-dropdown-broken-left-column/#respond Mon, 26 Oct 2015 09:26:12 +0000 http://itheadaches.com/?p=1874 ]]> design/frontend/mogan/default/template/catalog/layer/view.phtml

moved javascript to the very bottom

<script>
jQuery(document).ready(function(){
jQuery(document).on('click',"#shop-by-header",function(){
jQuery("#shop-by-content").slideToggle();
});
jQuery(document).on('click',"dt[data-toggle='true']",function(){

var elm=jQuery(this),name=jQuery(this).attr('data-name').split('-')[1];
console.log('dd[data-toggle="toggle-'+name+'"]');
jQuery('.toggle-'+name).slideToggle( "slow",function(){
if(elm.text()==='- '){
elm.find('span').text('+ ');
}else{
elm.find('span').text('- ');
}
});
});
});
</script>java

 

]]>
http://itheadaches.com/magento-menu-toggle-dropdown-broken-left-column/feed/ 0 1874
Magento – Add pagination to new products CMS page http://itheadaches.com/magento-add-pagination-new-products-cms-page/ http://itheadaches.com/magento-add-pagination-new-products-cms-page/#respond Mon, 26 Oct 2015 00:55:56 +0000 http://itheadaches.com/?p=1871 ]]> http://www.dnawebagency.com/displaying-new-products-in-magento-with-pagination/

]]>
http://itheadaches.com/magento-add-pagination-new-products-cms-page/feed/ 0 1871
Magento – swatches slowing down site http://itheadaches.com/magento-swatches-slowing-site/ http://itheadaches.com/magento-swatches-slowing-site/#respond Mon, 19 Oct 2015 08:39:14 +0000 http://itheadaches.com/?p=1851 […]]]> The category page aka product-list page was really slow to load, about 25 seconds plus

To troubleshoot Magento’s cpu usage, first enable varien profiler

http://www.techawaken.com/enable-magento-profiler-identify-magento-performance-bottlenecks/

You can also try aoe_profiler

Found out it was the configurable swatches.

Tried the first method in this post.

http://magento.stackexchange.com/questions/69863/configurable-swatches-slow-site-down

My load time went from 25s to 10s. Then I tried the 2nd post which points to https://github.com/wigman/AjaxSwatches

Load time went down 3s

BTW I am running Magento 1.9.2.1

]]>
http://itheadaches.com/magento-swatches-slowing-site/feed/ 0 1851
import sample magento magmi configurable product csv http://itheadaches.com/import-sample-magento-magmi-configurable-product-csv/ http://itheadaches.com/import-sample-magento-magmi-configurable-product-csv/#respond Mon, 12 Oct 2015 09:03:37 +0000 http://itheadaches.com/?p=1833 […]]]> I used the export all products dataflow as a template then started modifying it from there. Put configurable product at the end.

Added + in front of image url so that it will not add as exclude image http://magento.stackexchange.com/questions/29891/magmi-images-excluded

added 3 columns: media_gallery,super_products_sku,configurable_attributes http://stackoverflow.com/questions/16166425/magmi-importing-configurable-product

Used magmi to import the csv http://sourceforge.net/projects/magmi/

in magmi enabled itemprocessors, “Magmi Optimizer, Magmi Magento Reindexer, Image attriutes processor, On the fly indexer, Configurable Item Processor”

BTW this was done on Magento 1.9.x

copy and paste as csv file and open in csv viewer like openoffice or excel

 

store,websites,attribute_set,type,category_ids,sku,has_options,name,meta_title,meta_description,image,small_image,thumbnail,gallery,url_key,url_path,custom_design,page_layout,options_container,image_label,small_image_label,thumbnail_label,country_of_manufacture,msrp_enabled,msrp_display_actual_price_type,gift_message_available,gift_wrapping_available,color,status,is_recurring,visibility,tax_class_id,occasion,apparel_type,sleeve_length,fit,size,length,gender,description,short_description,meta_keyword,custom_layout_update,special_from_date,special_to_date,news_from_date,news_to_date,custom_design_from,custom_design_to,price,special_price,weight,msrp,gift_wrapping_price,qty,min_qty,use_config_min_qty,is_qty_decimal,backorders,use_config_backorders,min_sale_qty,use_config_min_sale_qty,max_sale_qty,use_config_max_sale_qty,is_in_stock,low_stock_date,notify_stock_qty,use_config_notify_stock_qty,manage_stock,use_config_manage_stock,stock_status_changed_auto,use_config_qty_increments,qty_increments,use_config_enable_qty_inc,enable_qty_increments,is_decimal_divided,stock_status_changed_automatically,use_config_enable_qty_increments,product_name,store_id,product_type_id,product_status_changed,product_changed_websites,website,_media_image,_media_lable,_media_position,_media_is_disabled,media_gallery,super_products_sku,configurable_attributes
admin,base,Clothing,simple,,taka012c-Royal Blue-L,0,taka Knit Top-Royal Blue-L,,,+http://dreamatico.com/data_images/girl/girl-8.jpg,http://dreamatico.com/data_images/girl/girl-8.jpg,http://dreamatico.com/data_images/girl/girl-8.jpg,,taka-knit-top-royal-blue-l,taka-knit-top-royal-blue-l.html,,1 column,Product Info Column,,,, ,Use config,Use config,No,No,Royal Blue,Enabled,No,Not Visible Individually,Taxable Goods,Casual,Knits,Short Sleeve,,L,,Female,”Loose fitting from the shoulders, open weave knit top. Semi sheer. Slips on. Faux button closure detail on the back. Linen/Cotton. Machine wash.”,The demure taka Knit features a semi sheer open weave and a forgiving silhouette. A nude camisole underneath keeps a stylish but conservative look.,,,3/1/13 0:00,,3/1/13 0:00,,,,210,,1,,,100,0,1,0,0,1,1,1,0,1,1,,,1,0,1,0,1,0,1,0,0,0,1,taka Knit Top-Royal Blue-L,0,simple,,,,,,,,/1/_/1_3.jpg;/2/_/2_2.jpg;/3/_/3_2.jpg;/4/_/4_2.jpg;/5/_/5_2.jpg,,
admin,base,Clothing,simple,,taka012c-Royal Blue-M,0,taka Knit Top-Royal Blue-M,,,+http://dreamatico.com/data_images/girl/girl-8.jpg,http://dreamatico.com/data_images/girl/girl-8.jpg,http://dreamatico.com/data_images/girl/girl-8.jpg,,Taka-knit-top-royal-blue-m,Taka-knit-top-royal-blue-m.html,,1 column,Product Info Column,,,, ,Use config,Use config,No,No,Mint,Enabled,No,Not Visible Individually,Taxable Goods,Casual,Knits,Short Sleeve,,M,,Female,”Loose fitting from the shoulders, open weave knit top. Semi sheer. Slips on. Faux button closure detail on the back. Linen/Cotton. Machine wash.”,The demure taka Knit features a semi sheer open weave and a forgiving silhouette. A nude camisole underneath keeps a stylish but conservative look.,,,3/1/13 0:00,,3/1/13 0:00,,,,210,,1,,,100,0,1,0,0,1,1,1,0,1,1,,,1,0,1,0,1,0,1,0,0,0,1,taka Knit Top-Royal Blue-M,0,simple,,,,,,,,/1/_/1_3.jpg;/2/_/2_2.jpg;/3/_/3_2.jpg;/4/_/4_2.jpg;/5/_/5_2.jpg,,
admin,base,Clothing,configurable,”10,11″,taka012c,1,taka Knit Top,,,+http://7-themes.com/data_images/out/75/7030450-miranda-kerr-smile-girl.jpg,http://7-themes.com/data_images/out/75/7030450-miranda-kerr-smile-girl.jpg,http://7-themes.com/data_images/out/75/7030450-miranda-kerr-smile-girl.jpg,,taka-knit-top,taka-knit-top-1046.html,,1 column,Product Info Column,,,, ,Use config,Use config,No,No,,Enabled,,”Catalog, Search”,Taxable Goods,Casual,Knits,Short Sleeve,,,,Female,”Loose fitting from the shoulders, open weave knit top. Semi sheer. Slips on. Faux button closure detail on the back. Linen/Cotton. Machine wash.”,The demure taka Knit features a semi sheer open weave and a forgiving silhouette. A nude camisole underneath keeps a stylish but conservative look.,,,3/1/13 0:00,,3/1/13 0:00,,,,210,,,,,0,0,1,0,0,1,1,1,0,1,1,,,1,0,1,0,1,0,1,0,0,0,1,taka Knit Top,0,configurable,,,,,,,,https://pbs.twimg.com/profile_images/378800000767456340/d2013134969a6586afd0e9eab6b0449b.jpeg::taka012c;http://f9view.com/wp-content/uploads/2014/05/Cute-Australian-Girl-Mobile-HD-Wallpapers.jpg::taka012c;,”taka012c-Royal Blue-L,taka012c-Royal Blue-M”,”size,color”

]]>
http://itheadaches.com/import-sample-magento-magmi-configurable-product-csv/feed/ 0 1833
Open-e “ERR_SSL_VERSION_OR_CIPHER_MISMATCH” http://itheadaches.com/open-e-err_ssl_version_or_cipher_mismatch/ http://itheadaches.com/open-e-err_ssl_version_or_cipher_mismatch/#respond Mon, 28 Sep 2015 23:56:37 +0000 http://itheadaches.com/?p=1810 ]]> https___192_168_78_4__failed_to_load

Install old version of firefox

https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/

change SSL authorization to “SSL v3 + TLS” once you are able to access Open-e

ssl

]]>
http://itheadaches.com/open-e-err_ssl_version_or_cipher_mismatch/feed/ 0 1810
PHP message: PHP Fatal error: Class ‘SoapClient’ not found in …..php on line 134″ while reading response header from upstream, client: 173.197.xxx.xx, server: papertine.com, request: “GET /zeki893.php HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “papertine.com” http://itheadaches.com/php-message-php-fatal-error-class-soapclient-found-php-line-134-reading-response-header-upstream-client-173-197-xxx-xx-server-papertine-com-request-get-zeki893/ http://itheadaches.com/php-message-php-fatal-error-class-soapclient-found-php-line-134-reading-response-header-upstream-client-173-197-xxx-xx-server-papertine-com-request-get-zeki893/#respond Mon, 28 Sep 2015 06:53:51 +0000 http://itheadaches.com/?p=1799 ]]> Problem:

"PHP message: PHP Fatal error: Class 'SoapClient' not found in /usr/share/nginx/html/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php on line 134" while reading response header from upstream, client: 173.197.173.75, server: papertine.com, request: "GET /zeki893.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "papertine.com"

Fix:

yum install php-soap

]]>
http://itheadaches.com/php-message-php-fatal-error-class-soapclient-found-php-line-134-reading-response-header-upstream-client-173-197-xxx-xx-server-papertine-com-request-get-zeki893/feed/ 0 1799
wordpress high cpu load http://itheadaches.com/wordpress-high-cpu-load/ http://itheadaches.com/wordpress-high-cpu-load/#respond Thu, 03 Sep 2015 03:30:03 +0000 http://itheadaches.com/?p=1791 ]]> first installed mysql query

https://wordpress.org/plugins/query-monitor/

this is a bad ass plugin

this plug lead me to a huge mysql query then found it was a bug in wordpress v4.3

https://wordpress.org/support/topic/high-cpu-load-after-update-to-v43?replies=17#post-7330770

 

]]>
http://itheadaches.com/wordpress-high-cpu-load/feed/ 0 1791
some stuff nginx stuff http://itheadaches.com/stuff-nginx-stuff/ http://itheadaches.com/stuff-nginx-stuff/#respond Tue, 25 Aug 2015 23:29:26 +0000 http://itheadaches.com/?p=1780 ]]> https://www.digitalocean.com/community/tutorials/understanding-nginx-server-and-location-block-selection-algorithms

https://www.digitalocean.com/community/tutorials/understanding-and-implementing-fastcgi-proxying-in-nginx

https://www.digitalocean.com/community/tutorials/how-to-setup-fastcgi-caching-with-nginx-on-your-vps

https://rtcamp.com/wordpress-nginx/tutorials/single-site/fastcgi-cache-with-purging/

https://serversforhackers.com/nginx-caching/

http://myjeeva.com/php-fpm-configuration-101.html

https://github.com/nicolargo/varnish-nginx-wordpress

]]>
http://itheadaches.com/stuff-nginx-stuff/feed/ 0 1780
Magento Customer List in Back Office Only One Page of Records http://itheadaches.com/magento-customer-list-back-office-one-record/ http://itheadaches.com/magento-customer-list-back-office-one-record/#respond Sun, 09 Aug 2015 09:59:39 +0000 http://itheadaches.com/?p=1764 […]]]> Thank you kalpesh!!!! I’ve had problem for a long time only showing one page of Customers in my ‘Manage Customers’ list and I was running 1.8.1.0. I just upgraded to 1.9.2.1 and finally decided to try to tackle this issue while I was working on the server. Found this post, and now I can see all 5000+ customers.
I wonder why Magento hasn’t fixed this issue since version 1.5!!!!

http://ka.lpe.sh/2012/01/05/magento-wrong-count-in-admin-grid-when-using-group-by-clause-overriding-lib-module/

Copy Db.php file from magento / lib / Varien / Data / Collection / Db.php
Paste it to your local directory so the resultant folder structure would look like this:
magento / app / code / local / Varien / Data / Collection / Db.php

Now open this file to edit and replace getSelectCountSql function with below one

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public function getSelectCountSql()
    {
        $this->_renderFilters();

        $countSelect = clone $this->getSelect();
        $countSelect->reset(Zend_Db_Select::ORDER);
        $countSelect->reset(Zend_Db_Select::LIMIT_COUNT);
        $countSelect->reset(Zend_Db_Select::LIMIT_OFFSET);
        $countSelect->reset(Zend_Db_Select::COLUMNS);

        if(count($this->getSelect()->getPart(Zend_Db_Select::GROUP)) > 0) {
            $countSelect->reset(Zend_Db_Select::GROUP);
            $countSelect->distinct(true);
            $group = $this->getSelect()->getPart(Zend_Db_Select::GROUP);
            $countSelect->columns("COUNT(DISTINCT ".implode(", ", $group).")");
        } else {
            $countSelect->columns('COUNT(*)');
        }
        return $countSelect;
    }

]]>
http://itheadaches.com/magento-customer-list-back-office-one-record/feed/ 0 1764
pretashop – display product features in invoice http://itheadaches.com/pretashop-display-product-features-invoice/ http://itheadaches.com/pretashop-display-product-features-invoice/#respond Thu, 30 Jul 2015 08:09:09 +0000 http://itheadaches.com/?p=1759 ]]> https://www.prestashop.com/forums/topic/328432-display-features-in-invoice/

]]>
http://itheadaches.com/pretashop-display-product-features-invoice/feed/ 0 1759
Zimbra, MySQL, Java and the Leap Second, High CPU problem http://itheadaches.com/zimbra-mysql-java-leap-second-high-cpu-problem/ http://itheadaches.com/zimbra-mysql-java-leap-second-high-cpu-problem/#respond Fri, 17 Jul 2015 07:31:55 +0000 http://itheadaches.com/?p=1755 ]]> Fixed our problem.

https://blog.zimbra.com/2015/07/zimbra-mysql-java-leap-second-high-cpu-problem/

]]>
http://itheadaches.com/zimbra-mysql-java-leap-second-high-cpu-problem/feed/ 0 1755
Observium client setup notes http://itheadaches.com/observium-setup/ http://itheadaches.com/observium-setup/#respond Tue, 14 Jul 2015 01:38:53 +0000 http://itheadaches.com/?p=1746 […]]]> observium server on ubuntu

http://www.observium.org/docs/debian_ubuntu/

observium agent

wget http://x.x.x.x/apache
wget http://x.x.x.x/mysql
wget http://x.x.x.x/nginx

ubuntu

#setup agent
apt-get -y install xinetd wget
cd /etc/xinetd.d/
wget http://x.x.x.x/observium_agent_xinetd
cd /usr/bin/
wget http://x.x.x.x/observium_agent
chmod 775 /usr/bin/observium_agent
mkdir /usr/lib/observium_agent
mkdir /usr/lib/observium_agent/local
service xinetd restart
#monitor with mysql agent
apt-get -y install php5-cli php5-mysql
cd /usr/lib/observium_agent/local
wget http://x.x.x.x/mysql
chmod 775 mysql
echo "<?php \$mysql_user = 'observium_mon'; \$mysql_pass='xxx'; ?>" > /usr/lib/observium_agent/local/mysql.cnf

mysql -e "GRANT SUPER, REPLICATION SLAVE, PROCESS ON *.* TO 'observium_mon'@'localhost' IDENTIFIED BY 'xxx';"
apt-get -y install snmpd
cd /usr/bin/
wget http://x.x.x.x/distro
chmod 775 distro
cd /etc/snmp/
mv snmpd.conf snmpd.conf.orig
wget http://x.x.x.x/snmpd.conf
service snmpd restart

]]>
http://itheadaches.com/observium-setup/feed/ 0 1746
compiling cacti-spine 0.8.8d with mariadb on centos6 http://itheadaches.com/compiling-cacti-spine-0-8-8d-mariadb-centos6/ http://itheadaches.com/compiling-cacti-spine-0-8-8d-mariadb-centos6/#respond Sat, 11 Jul 2015 01:24:01 +0000 http://itheadaches.com/?p=1744 ]]> get the other libraries snmp, ssl, etc

yum install MariaDB-devel
ln -s /usr/lib64/mysql/libmysqlclient_r.so.16.0.0 libmysqlclient_r.so
ln -s /usr/lib64/mysql/libmysqlclient.so.16.0.0 libmysqlclient.so

then compile
if you get this error during make
common.h:143:18: error: mib.h: No such file or directory

then

cp /usr/include/net-snmp/library/mib.h .

]]>
http://itheadaches.com/compiling-cacti-spine-0-8-8d-mariadb-centos6/feed/ 0 1744
Change username in Ubuntu http://itheadaches.com/change-username-ubuntu/ http://itheadaches.com/change-username-ubuntu/#respond Thu, 11 Jun 2015 23:51:46 +0000 http://itheadaches.com/?p=1735 ]]> To manage every aspect of the user database, you use the usermod tool.

To change username (it is probably best to do this without being logged in):

usermod -l newUsername oldUsername

This however, doesn’t rename the home folder.

To change home-folder, use

usermod -d /home/newHomeDir -m newUsername

after you changed the username.

]]>
http://itheadaches.com/change-username-ubuntu/feed/ 0 1735