Try changing the permissions on .ssh/authorized_hosts to restrict READ AND WRITE to your user eg. chmod go-rw ~/.ssh/authorized_hosts SSH doesn’t like it when these files are world-readable Assuming that you wish to login to the machine called mystery from your current host with the id_rsa and id_rsa.pub files you’ve just generated you should run the …
Category: Linux
Linux Tips and tricks, either for desktop or internal system.
Installing ZABBIX on Debian(Etch and Lenny)
ZABBIX ====== http://www.zabbix.com [^] This is an open source and seems quite good. It is available through Debian Repository as packages: zabbix-frontend-php (for central monitoring host) installed in monitoring server zabbix-server-mysql (for central monitoring host) installed in monitoring server zabbix-agent (for each monitored host) Installed in ALL 8 Hosts The mysql data: DB: zabbix user: …
Backing up Linux system
After cheking the backups I found that some didn’t get done properly(eg. WWW-1) but in HP-1 everything was OK. The old backups previously done via duplicity will be available still for a few months and then will be deleted. These old backups are in ‘bkdirx_duplicity’ directories. Finally I decided to change the program used to …
Linux iptables Diagram
To add a swap file
1. Determine the size of the new swap file and multiple by 1024 to determine the block size. For example, the block size of a 64 MB swap file is 65536. 2. At a shell prompt as root, type the following command with count being equal to the desired block size: dd if=/dev/zero of=/swapfile bs=1024 …
To fix the subshell problem in MC
Error message: Cannot open master side of pty: No such file or directory Then Add the following in /etc/fstab none /dev/pts devpts mode=0620 0 0
Creating a bootable USB stick from CD .iso file
NOTE: This worked for the RescueCD.iso file but might need some tweeking for other types of live CDs. Here we are assuming that the USB disk is: /dev/sdc – Make sure the single stick partition is: – the partition is tagged as bootable.(use fdisk for that) – formatted as VFAT32 mkfs.vfat -F 32 -n MYLABEL …
Dump the result of wget to STDOUT
wget -q -O – http://www.mysite.com
Change memory size while running XEN vMachine
While running you can change the live memory size of a VM or the Domani-0 (although may be dangerous for crashes) Use the command: xm mem-set ID NewMEMSize
Stop/Start a single XEN virtual machine
Assuming that the virtual machine is running, to stop the machine: – Make a list of the running virtual machines and note the ID of the one concerned. xl list Lets suppose the ID of the virtual machine concerned is 15 – Shutdown the machine. xl shutdown 15 – Make a few xm list commands …
Resizing XEN virtual image
Question: I am using Xen to create Virtual Machines, but how can I re-size the virtual disk image? Solution: Add an extra empty space to your virtual disk size and re-size the filesystem in it: or if reducing is needed, minimize the files system, add empty space to it as desired and re-size it. Example …
Compile Apache 2 in Debian/Ubuntu/Mint/..
Introduction: Steps to compile Apache: – Installation of needed development packages – Prepare the directories needed – copy the config file and script below – Run the script below Installation of needed development packages Needed for Apache mod_deflate libzip-dev (sources) libzip1 (bin libs.) zlib1g-dev (sources) Needed for Mod_security libpcre3-dev libpcrecpp0 libxml2-dev Compiling script Configuration file …
Assign processes to CPUs
use the tool: taskset
PROBLEM: ssh hangs for many seconds before giving prompt
The solution: uncomment(activate) GSSAPIAuthentication=no in /etc/ssh/ssh_config
Using iTERM – The best terminal program for Linuxers
Configuration file: The full Config Plist is ~/Library/Preferences/com.googlecode.iterm2.plist it seem that it may be used to store the defaults values at startup, but the main one is the first one. Modifying/replacing the configuration file: Preferences are cached in 10.9. See http://hints.macworld.com/article.php?story=20130908042828630. If you edit a plist file directly or replace the plist of an application, …
Get the response content in terminal
w3m -dump http://my.server.com
Preventing loging for some documents types
eg. SetEnvIfNoCase Request_URI “.*\.html” !NOLOG CustomLog /var/log/httpd/main.log j_common env=!NOLOG
Get RSS with bash
#!/bin/bash lynx -source http://rss.freshmeat.net/freshmeat/feeds/fm-releases-global | sed -n ‘s/.*//gp’ | sed ‘s/
Compiling a new standard Apache DSO module
# Build and install a distributed Apache module, say mod_foo.c, into its own DSO mod_foo.so: * Build and install via configure (preferred): $ ./configure –prefix=/path/to/install –enable-shared=foo $ make install * Build and install manually: – Edit src/Configuration: > SharedModule modules/xxxx/mod_foo.so $ make $ cp src/xxxx/mod_foo.so /path/to/install/libexec – Edit /path/to/install/etc/httpd.conf >> LoadModule foo_module /path/to/install/libexec/mod_foo.so # Build …
Mod_jk shared file size in Apache 1.3.x
It can occur that a new worker set prevents apache to start, although correct configured. Possible cause: Mod_JK shared file is too small Size must be at least: Header: 84 Bytes Per Worker: 400 Bytes Extra at the end: 800 Bytes Any type worker uses the same amount of memory(400 bytes): loadBalancers and hosts Configuration: …
Example of mod_security Configuration
SecFilterEngine DynamicOnly SecFilterScanPOST On SecFilterDefaultAction “deny,log,status:400” SecFilterSelective REQUEST_URI “
MOD GZIP Configuration in Apache 1.3.x
NOTE: The size of the zipped content(not header) is about 1/3 of original size. mod_gzip_command_version ‘/mod_gzip_status’ mod_gzip_temp_dir /tmp/mod_gzip_httpd mod_gzip_keep_workfiles No mod_gzip_minimum_file_size 1000 mod_gzip_maximum_file_size 100000 mod_gzip_maximum_inmem_size 60000 mod_gzip_min_http 1000 mod_gzip_handle_methods GET mod_gzip_item_include file \.html$ mod_gzip_item_include file \.jsp$ mod_gzip_item_include file \.do$ mod_gzip_item_include mime text/html mod_gzip_item_include mime text/plain mod_gzip_item_include mime application/x-javascript mod_gzip_item_include mime text/css mod_gzip_item_include mime text/xml mod_gzip_item_include …
Problem with openssl and Compiling Apache 2.2.11
Ursache ist, dass die Pfade richtig gesetzt werden müssen, damit ld den Parameter -lssl kennt. export LD_LIBRARY_PATH=”/www/hans/src/openssl-0.9.8j/” export LIBS=”-L/www/hans/src/openssl-0.9.8j” export CPPFLAGS=”-I/www/hans/src/openssl-0.9.8j/include/openssl” echo $LD_LIBRARY_PATH /www/jamba/src/openssl-0.9.8j/:/usr/lib/ echo $LIBS -L/www/jamba/src/openssl-0.9.8j echo $CPPFLAGS -I/www/jamba/src/openssl-0.9.8j/include/openssl
Issues on MaxClients Directive
WARNING: MaxClients of 3000 exceeds compile time limit of 2048 servers, lowering MaxClients to 2048. To increase, please see the HARD_SERVER_LIMIT define in src/include/httpd.h. Why increase MaxClients to 2048? Apache 1.x is non-threaded, so increasing MaxClients beyond 256 usually results in lower performance; often dramatically lower performance. At a prior job I worked with a …
setting Apache 2 ENVIRONMENT VARIABLES
in /etc/apache2/envvars # envvars-std – default environment variables for apachectl # # This file is generated from envvars-std.in # export APACHE_RUN_USER=www-data export APACHE_RUN_GROUP=www-data export APACHE_PID_FILE=/var/run/apache2.pid umask 002
GZIP Log Format
LogFormat “\”%h\” \”%{HOST}i\” \”%u\” \”%t\” \”%r\” \”%>s\” \”%b\” \”%{Referer}i\” \”%{User-Agent}i\” \”%{Connection}i\” \”%{Connection}o\” \”%{Content-Type}o\” \”%T\” \”PID:%P\” \”%{mod_gzip_result}n\” \”%{mod_gzip_input_size}n\” \”%{mod_gzip_output_size}n\” \”%{mod_gzip_compression_ration}n\”” JAMBA_BASIS_LOGFORMAT_GZIP
Using mod_cband to limit bandwidth per vhost
mod_cband (http://cband.linux.pl) can do this from 0.9.6.0 version! You should use CBandExceededSpeed directive to slow down pages when the bandwidth is exceeded 🙂 See: http://www.howtoforge.com/mod_cband_apache2_bandwidth_quota_throttling http://www.icewalkers.com/Linux/Software/524590/mod_cband.html http://www.montanalinux.org/mod_cband.html http://www.uno-code.com/?q=node/64
SSL error solution
If an SSL error goes like this: In Browser: (Error code: ssl_error_rx_record_too_long) or in log file: [error] [client 81.19.201.7] Invalid method in request \\x16\\x03\\x01 Solution: Include the following directive in vhost: SSLEngine on That was it . 😉
MPM ‘worker’ configuration (Apache2)
Directive Description Default (worker.MPM) ===================== =============================================================================== ==================== ListenBackLog Maximum length of the queue of pending connections 511 . MaxClients Global maximum number of connections that will be processed simultaneously 400 MaxClients SHOULD NOT be lower than (ServerLimit) x (ThreadsPerChild). Normally they should be equal. . ServerLimit Upper limit on configurable number of processes (children) 16 …
To test WAP web site with telnet
telnet http://address 80 GET / WML/1.2
Logging Apache Access logs through syslogd
Error logs can be logged very easyly to syslig using the following ErrorLog syslog:local1 Access logs must use a pipe-to-script trick as follows: In Apache config: CustomLog |/usr/local/apache/bin/apache_syslog combined As script in system: Content of /usr/local/apache/bin/apache_syslog ——————————————— logger -i -p local3.info -t TEST-APACHE ——————————————— chmod 755 /usr/local/apache/bin/apache_syslog
Brute force test Apache
apt-get install siege or apt-get install apache2-utils and use the program ‘ab‘ eg. /usr/sbin/ab -n 100 http://yoursite.com/
Running mod_gzip, mod_rewrite, and mod_proxy together in Apache 1.3.x
When using RewriteRule ….[P] with mod_gzip there are often problems To resolve this add the following directive to mod_gzip ———————————————– mod_gzip_item_include handler proxy-server ———————————————– mod_gzip_item_include mime “application/x-httpd-php.*” mod_gzip_item_include mime httpd/unix-directory mod_gzip_item_include handler ^server-status$ mod_gzip_item_exclude file \.css$ mod_gzip_item_exclude file \.js$ mod_gzip_item_exclude reqheader “Via:.*1\.0 PROXY” mod_gzip_item_exclude reqheader “Via:.*1\.0 lavoisier \(NetCache NetApp\/5\.0\.1R2\)”
Examples of mod_security diretives
SecFilterEngine On SecFilterScanPOST On SecFilterSelective “POST_PAYLOAD” “BoesesWort” “deny,log,status:412” # Ersetze BoesesWort durch das Wort, welches du sperren willst. # Speichere die Textdatei unter dem Namen .htaccess (den führenden Punkt nicht vergessen) SecFilterSelective “POST_PAYLOAD” “AnderesBoesesWort” “deny,log,status:412” # Alternative SecFilterSelective “POST_PAYLOAD” “BoesesWort” “deny,log,redirect:http.//www.deinedomain.de/seite.html”
Using curl to test PUT method to upload to web server
curl -u user:pass -T /home/guest/test.txt http://my.server.com:8082/upload/
MOD_JK configuration directives
see: http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html The following directives are normally inserted in workers.properties file connection_pool_minsize (default 0) defines, how many idle connections remain when the pool gets shrinked. By default this is half of the maximum pool size. connection_pool_size (default 0) We generally do not recommend to use this attribute in combination with Apache httpd. For Apache httpd …
Logging gzip compression factor of files
LogFormat “%h %l %u %t \”%r\” %>s %b mod_gzip:%{mod_gzip_result}n In:%{mod_gzip_input_size}nOut:%{mod_gzip_output_size}n:%{mod_gzip_compression_ratio}npct.” full_plus_gzip [17:29:14] CustomLog /var/log/httpd/mod_gzip.log full_plus_gzip Example of log entry: /reviews/cooling/HSR2_4.html HTTP/1.1″ 200 6289 mod_gzip: DECHUNK:OK In:23352 Out:6289:74pct.
Checkig the loading time a web site without loading its objects
date +%S.%N;w3m -dump http://www.mysite.de &>/dev/null;date +%S.%N
Selecting filtering what can be logged ‘per request’ level
SetEnvIfNoCase Request_URI “^/string to exclude/” drop and then between and CustomLog /var/log/httpd/www.mydomainname.com-access_log combined env=!drop
To UNSET an environment variable using SetIfEnv
eg. SetEnvIfNoCase Request_URI “.*\.html” !NOLOG Unsets the previously set NOLOG environment variable
Logformat code list
%…a: Remote IP-address %…A: Local IP-address %…B: Bytes sent, excluding HTTP headers. %…b: Bytes sent, excluding HTTP headers. In CLF format i.e. a ‘-‘ rather than a 0 when no bytes are sent. %…c: Connection status when response was completed. ‘X’ = connection aborted before the response completed. ‘+’ = connection may be kept alive …
To connect to SSL apache from command line
openssl s_client -connect localhost:443 -state -debug GET / HTTP/1.0
Tool to unstick MySQL Replicators.
# I’m managing an infrastructure with a number of databases who # (for codified reasons that I cannot influence) suffer from this situation often. # So, I’ve written a cron script to manage the situation. # Does anyone see any foreseeable issues with this logic (see below)? # —————————————– SCRIPT —————————————– #!/bin/bash ## Tool to …
Slave rebuild from live slave.
It is also possible to set up a slave by dumping an existing slave of the master. To do this, use the following procedure on the existing slave: 1.Stop the slave’s SQL thread and get its current status: mysql> STOP SLAVE SQL_THREAD; mysql> SHOW SLAVE STATUS; 2.From the output of the SHOW SLAVE STATUS statement, …
PROBLEM: Could not find target log during relay log initialization
SOLUTION: delete relay bin file in slave and try slave stop ; CHANGE MASTER TO master_log_file=’name_of_current_file_on_master’,master_log_pos=4; slave start; it will download play again the file IMPORTANT: Make sure the master log file is the one that was being read by the slave when the error occured, otherwise you loose data.
FULL Manual rebuilding of SLAVE MySQL server mysql02 from Master mysql01
On mysql01 (MASTER): ——————– mysqldump -u root -p –single-transaction –flush-logs –master-data=2 –all-databases –delete-master-logs | gzip | ssh mysql02 ‘cat | gunzip >/var/lib/mysql_temp.sql’ echo “SHOW MASTER STATUS;” | mysql -p -u root Note the filename eg. mysql-bin.000299 we will use it later on mysql02 On mysql02 (SLAVE): ——————- – Changed the following config is in /etc/mysql/my.cnf …
MySQL replication issues
Good links: =========== http://www.howtoforge.com/how-to-repair-mysql-replication MySQL recover from Backup .sql data ====================================== mysql -u root -p dbName backup-dbNameDump.sql ———– Very useful in slave ————————————————————– slave-skip-errors=126,1062 126 = the ambiguous ‘unknown error on master’ typically caused by tables in dis-repair on master. 1062 = duplicate entry (happens all the time on high capacity db in master-master setup)
Hide MC editor tabs or traiting spaces
In ~/.mc/ini editor_visible_spaces=0 editor_visible_tabs=0
Burning iso cd under Ubuntu
wodim –devices wodim dev=/dev/cdrw -v -data cd_image.iso More Brning features under Ubuntu https://help.ubuntu.com/community/CdDvd/Burning
SSH File system mounting
Mounting: sshfs -Cuser@severname:/path/to/mount /local/mount/point -o follow_symlinks -o allow_other Unmounting: fusermount -u /local/mount/point
Find out which UBUNTU version is installed
Extracting the last character of a string
echo “/home/jadmin/server/server005A1” | sed ‘s/.*\([0-9]\)\s*$/\1/g’ Response: 1
apt-get signatures problem:
Probleme mit GPG Wenn apt-get update eine Fehlermeldung in der Art liefert ————- GPG error: http://security.debian.org testing/updates Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 010908312D230C5F ————- hilft: apt-get install debian-archive-keyring apt-key update
Running FTPs (NOT SSH based) with lftp and vsftpd
Needs to set the client as follows after connection established to limit the use of port and guarantee SSL transport of Data (default is still unencrypted) set port-range 1025-1025 set ftp:ssl-protect-data true
Formating text command
printf “%10s %10s\n” foo bar or even better cat /etc/fstab | column -t
Burning MP3 files with K3B
To burn MP3 files with K3B install the libk3b2-extracodecs.
Installing amd64 Foxpro Java Plugin
FROM: Java 6u12 bringt 64bit Plugin für Ubuntu / Linux Java 6u12 wurde von Sun für den produktiven Einsatz freigegeben. Vermutlich nicht zuletzt dank JavaFX wurde nun nach sechs Jahren(!) damit der Bug 4802695 geschlossen: Es gibt nun ein 64 bit Java Plugin für Linux und auch für Windows. Endlich! Wer Ubuntu 8.10 Intrepid hat, …
Starting vi for editing Apache
vim -c “syntax enable” -c “set syntax=apache” $FILE_NAME
Special characters for SED editor
Note that we used a different delimiter, @ for the substitution command. Sed permitsseveral delimiters for the s command including @%,;: these alternative delimiters aregood for substitutions which include strings such as filenames, as it makes your sedcode much more readable.
Open file and jump to a specific pattern in less
less -p pattern filaname
Creating indents in Confluence (Intranet)
{section} {column:width=5%} {column} {column} Text comes here {column} {section} Adding a ‘Table of content’ atht eh beginning of the cdocument h2. Table of content {toc:outline=true|indent=0px|maxLevel=3}
Creating debian binary packages from sources tar.gz
Install the following packages: checkinstall
Benchmarking and brute force testing of RAMs and CPU with STRESS
apt-get install stress $ stress –cpu 4 –vm 2 –vm-bytes 2G –timeout 60s $ stress –cpu 4 –vm 2 –vm-bytes 15G –timeout 1800s Belegt für 60s vier CPUs und 2 GB RAM. Funktioniert auch als normaler User, als root aber aggressiver, würde ich nach kurzem Test sagen. Hoffentlich lassen sich auch 16 GB belegen. Mit …
Creating a list of installed debian packages
PATH_TO_STORE=”/root/packages” FILE_TO_STORE=”installed_packages.txt” dpkg –get-selections | awk ‘{ if ( $2 == “install” ) print $1 ” ” $2 }’ > $PATH_TO_STORE/$FILE_TO_STORE
Grepping through zip files
zgrep -i affil -c web01-jadmin-2009-02-03-0006.log.gz
Maximum open files
The number of maximum files was reached, how do I fix this problem? Many application such as Oracle database server needs this range quite higher. So you can increase the maximum number of open files by setting new value in kernel variable /proc/sys/fs/file-max as follows (login as the root): # sysctl -w fs.file-max=100000 Above command …
Extract a part of a line using egrep
ls -l /home/helix/videos/* | cut -d’ ‘ -f8 | egrep -o ‘([^/]+$)’ In this example egrep starts from the back of the line and outputs only till ‘/’ appears This command can replace the basename command for multiple arguments
Using SSH to tunnel closed ports
ssh -2 sun.linux.local -L 7772:sun.linux.local:80
Testing a port on a remote host
echo x | telnet -e x hostname 22
Solving Delayed start of MC
This solves the trick by disabing the sub-shells. mc -u
SSH – Generating a host key
ssh-keygen -f /etc/ssh_host_rsa_key -N ”
UBUNTU – Selecting the standard java VM
update-alternatives –config java
Getting our own Internet IP from dyndns
wget -o /dev/null -O – http://checkip.dyndns.org | egrep -o ‘([[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3})’
Calculation with dates including chosen output format
date +’%d/%b/%Y:%H:%M’ -d “today +3 days +6 hours +15 minutes”
Generating consecutive numbers from start to end
eg. generating 1 2 3 4 5 …. till 100 > seq -w 1 100 (-w is for 01 02 03…. instead of 1 2 3 …. )
Send Output of program to a remote file (using compressed transmission)
cat /etc/motd | gzip | ssh remoteserver.com ‘cat | gunzip > /tmp/test_motd2’
MYSQL tools debian packages
maatkit and innotop maatkit as package is dependant to a perl module present in system maatkit as tar.gz can be installed independantly by a normal user
Export a gpg key
Use kgpg and right mouse click Export ….
Using DIG to resolve short (just the IP) of a (sub) domain
dig +short +tcp @79.171.206.20 www.jamba.de or dig +short +notcp @79.171.206.20 www.jamba.de
bash loops with miliseconds control
#!/bin/bash while true; do echo “Hello World!” perl -e ‘select( undef, undef, undef, 0.25 );’ done
bash loops with counter
for ((ip=1;$ip
To install Skype on AMD64 Linux system
AS ROOT: – Download the sykpe static version from: http://www.skype.com/go/getskype-linux-static and unpack it in /usr/local/skype cp /usr/local/skype/skype /usr/bin mkdir /usr/share/skype cp -a /usr/local/skype/avatars /usr/local/skype/icons /usr/local/skype/lang /usr/local/skype/sounds /usr/share/skype/ apt-get install ia32-libs AS USER: – Create a launch icon on desktop that runs: linux32 skype
Debian packages needed to compile software
apt-get install build-essential
Asking for Network status over snmp
snmpnetstat -v 2c -c public -t 330 -n -P tcp Hostname
a program that converts everything typed into it, into its backwards form
#!/usr/bin/perl print “Enter Anything: “; chomp($string = ); $string = reverse $string; print “$string\n”;
Logging all bash commands with user and timestamp
From: http://azio.org/2007/10/10/eternal-bash-history-super-duper-useful/ in /etc/profile and in /etc/bash.bashrc ———————————————————————– export HISTTIMEFORMAT=”(%d.%m.%Y) %H:%M ” export PROMPT_COMMAND=”${PROMPT_COMMAND:+$PROMPT_COMMAND ; }”‘echo “`date +’%d.%m.%y-%H:M:%S:’`” $USER “(“$ORIGINAL_USER”)” \ “COMMAND: ” “$(history 1 | cut -c8-)” >> /var/log/bash_eternal_history’ readonly PROMPT_COMMAND ———————————————————————– and then as root run the commands: touch /var/log/bash_eternal_history chmod 777 /var/log/bash_eternal_history chattr +a /var/log/bash_eternal_history
Preventing changes of variables through ssh session
– Make sure that the setting AcceptEnv is not set in /etc/ssh/sshd_config AcceptEnv Specifies what environment variables sent by the client will be copied into the session’s environ(7). See SendEnv in ssh_config(5) for how to configure the client. Note that environment passing is only supported for protocol 2. Variables are specified by name, which may …
Deleting a line in a file
eg. line 222 in known_hosts sed ‘222 d’ /home/tobias/.ssh/known_hosts > /tmp/1;cp /tmp/1 /home/tobias/.ssh/known_hosts
SSH Key forwarding
To be able to foreward an SSH key for ssh to server1 and from server1 ssh to server2 etc. 1) apt-get install keychain 2) use the following ssh command: > keychain -q id_rsa ; . ~/.keychain/$HOSTNAME-sh ; ssh -A user@servername 3) After logged in server1 always use: ssh -A user@servername
Advanced CRONTAB
There is an easy way to start a program during system boot. Just put this in your crontab: @reboot /path/to/my/program The command will be executed on every (re)boot. Crontab can be modified by running crontab -e Other available Options string meaning —— ———– @reboot Run once, at startup. @yearly Run once a year, “0 0 …
watch local network connections
———-Listen list————- netstat -ltpn lsof -i | grep LISTEN ———- Connection list ——- netstat -tpn lsof -i | grep ESTABLISHED
Filename with date_time in it
use this command inside the name $(date +%Y.%m.%d_%H:%M:%S)
Resuming an aborted scp transfer
Assume you have copied a file across the network using something like this: scp host:/path/to/file . Then assume something goes wrong, so the transfer is interrupted. To continue the transfer, do this: rsync –partial host:/path/to/file . (Or, rather, always use rsync as above when transferring very large files.) (Also note: I don’t know how frequently …
Install WAP-Browser on Firefox
1. Install WML-Browser: https://addons.mozilla.org/en-US/firefox/addon/62 2. Install User Agent Switcher: https://addons.mozilla.org/en-US/firefox/addon/59 3. Install XHTML Mobile Profile: https://addons.mozilla.org/en-US/firefox/addon/1345 4. Restart Firefox 5. Download this file to your desktop: http://techpatterns.com/downloads/firefox/useragentswitcher.xml (Right mouse button “Save Link As”) or http://techpatterns.com/downloads/firefox/useragentswitcher.xml 6. Go to: Tools -> User Agent Switcher -> Options -> Options 7. Click on Import and select the *useragentswitcher.xml* …