Saturday 17 January 2015

Linux Change Default User Home Directory While Adding A New User

By default base directory for the system user is set to /home directory. I'd like to add user to /iscsi/home/${user} directory instead of the default /home. How do I force useradd command to add user to /iscsi/home under CentOS / RHEL / Fedora Linux server?

Default values for account creation defined in /etc/default/useradd file under CentOS / RHEL / Fedora / Debian / Ubuntu and other Linux distros. Simply open this file using a text editor, type:
# vi /etc/default/useradd

The default home directory defined by HOME variable, find line that read as follows:
HOME=/home

Replace with:
HOME=/iscsi/user

Save and close the file. Now you can add user using regular useradd command:
# useradd vivek
# passwd vivek


Verify user information:
# finger vivek

Output:
Login: vivek                            Name: Vivek Gite
Directory: /iscsi/user/vivek                Shell: /bin/bash
Last login Thu Sep 13 07:58 2007 (IST) on pts/1 from 10.16.15.2
No mail.
No Plan.

How Do I Change Existing User's Home Directory?

You need to use the usermod command to set the user's new login directory. The syntax is as follows:
 
usermod -m -d /path/to/new/home/dir userNameHere
 
Where,
  1. -d dirnanme : Path to new login (home) directory.
  2. -m : The contents of the current home directory will be moved to the new home directory, which is created if it does not already exist.
In this example set the user's new login directory to /users/v/vivek from /home/vivek, enter:
# usermod -m -d /users/v/vivek vivek

 Source : http://www.cyberciti.biz/faq/howto-change-default-home-directory/

Wednesday 7 January 2015

Firefox browser tool to test Responsive Web design

Modern web browsers are more developer friendly, by providing Developer Tools to make web development easy. Thanks to Mozilla for integrating a feature, which allows to test the Responsive Web design with out using various physical devices.
How to use Responsive Web Design feature in Firefox?
  1. Launch Mozilla Firefox(Latest Version).
  2. Browse the website which you wish to test. For example – i will take – http://tickletheweb.com website, which is developed to have consistent view across the devices.
image
3.   Click on Firefox button on the left top corner of the browser, and select Web Developer –> Responsive Design View.
image
4.  It loads the Responsive Design View chrome -
image
5.  Select different resolutions from the dropdown control on the left corner of the chrome to test the website in different resolutions, which is simple and great.
image
6.  It also allows to test  Portrait or Landscape orientations. Click on rotate button, which toggles between the orientations.
image
Happy Web programming!!!

Source : https://roopeshreddy.wordpress.com/2013/05/26/firefox-browser-tool-to-test-responsive-web-design/