Posts

Showing posts from September, 2014

Linux Change Default User Home Directory

Linux Change Default User Home Directory While Adding A New User B y 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

Cron checker

If you are not sure how to setup cron this site will help http://cronchecker.net/

Installing and configuring Tripwire on CentOS

Creating site and local keyfile pass-phrases At first install from epel repository.     [[email protected] ~]# tripwire-setup-keyfiles ---------------------------------------------- The Tripwire site and local passphrases are used to sign a  variety  of files, such as the configuration, policy, and database files. Passphrases should be at least 8 characters in length and contain  both letters and numbers. See the Tripwire manual for more information. ---------------------------------------------- Creating key files... (When selecting a passphrase, keep in mind that good passphrases typically have upper and lower case letters, digits and punctuation marks, and are at least 8 characters in length.) Enter the site keyfile passphrase:     ## Enter site pass-phrase ## Verify the site keyfile passphrase:     ## Re-enter pass-phrase ## Generating key (this may take several minutes)...Key generation complete. (When selecting a passphrase, keep in mind that good passphrases typically h