Monday, September 30, 2013

Enabling Desktop Alerts in Outlook when using IMAP

Microsoft Outlook does not support desktop alerts as standard when using the IMAP protocol for email.  To enable desktop alerts a rule needs to be set in Outlook.  Please follow the instructions below to enable in Outlook.
Outlook 2003
  1. Start Outlook
  2. Go to Tools -> Rules and Alerts
  3. Select New Rule
  4. Select Start from a blank rule
  5. Select Check Messages when they arrive
  6. Click Next
  7. Click Next
  8. Select Yes to apply the rule to every message
  9. Select the checkbox for "display a Desktop Alert"
  10. Select Finish
  11. Select OK
Outlook 2007
  1. Start Outlook
  2. Go to Tools -> Rules and Alerts
  3. Select New Rule
  4. Select Check Messages when they arrive
  5. Click Next
  6. Click Next
  7. Select Yes to apply the rule to every message
  8. Select the checkbox for "display a Desktop Alert"
  9. Select Finish
  10. Select OK

Friday, August 30, 2013

Samba Restrict File Sharing To Particular Users or Network Addresses

hosts allow: Samba Configuration
Open your smb.conf file and add the following line to [share]
[share]
  hosts allow = 192.168.2. 127.0.0.1
valid users: Samba Configuration
Open your smb.conf file and add the following line to [share]
[share]
  valid users = user1 user2 @group1 @group2
read only & write only: Samba Configuration
You can also set read and write access to set of users with the read list and write list directives.
[share]
     read only = yes
     write list = user1 user2 @group1 @group2
Examples
Make [sales] share read only but allow user tom and jerry to write it:
[sales]
     comment = All Printers
     path = /nas/fs/sales
     read only = yes
     write list = tom jerry
You can also configure iptables to allow access to the Samba server

Thursday, August 15, 2013

Lightsquid : Monitoring SQUID users


Install LightSquid to generate Squid Log Report.

In Redhat 6.4

[1]Install LightSquid
[root@prox ~]# 
yum --enablerepo=epel -y install lightsquid lightsquid-apache 
  
# install from EPEL
[root@prox ~]# 
vi /etc/httpd/conf.d/lightsquid.conf
<Directory /usr/share/lightsquid/cgi>
     DirectoryIndex index.cgi
     Options ExecCGI
     AddHandler cgi-script .cgi
     AllowOverride None
     
# IP address you permit

     Order Deny,Allow
     Deny from all
     Allow from 127.0.0.1 10.0.0.0/24
</Directory>
[root@prox ~]# 
/etc/rc.d/init.d/httpd restart 

Stopping httpd: [ OK ]
Starting httpd: [ OK ]
# generate log report

[root@prox ~]# 
/usr/sbin/lightparser.pl
# log report is generated every day by cron
[2]Access to "http://(server's hostname or IP address)/lightsquid/" with web browser


IN Redaht 5

1. Download the lightsquid from “http://lightsquid.sourceforge.net/”
2. Install apache and start it
3. Copy the lightsquid folder to any web location like ” /var/www/html/”
4. Add an entry like as below in httpd.conf
#vi /etc/httpd/conf/httpd.conf   
 <Directory "/var/www/html/lightsquid">
   AddHandler cgi-script .cgi
   AllowOverride All
   deny from all
   allow from <my ip>
   </Directory>
Configuring lightsquid
A. Switch to lightsquid directory and check necessary perl libraries are present.
[root@rc-009 lightsquid]# perl check-setup.pl
LightSquid Config Checker, (c) 2005-9 Sergey Erokhin GNU GPL
LogPath   : /var/log/squid
reportpath: /var/www/html/lightsquid/report
Lang      : /var/www/html/lightsquid/lang/eng
Template  : /var/www/html/lightsquid/tpl/base
Ip2Name   : /var/www/html/lightsquid/ip2name/ip2name.simple
all check passed, now try ac
cess to cgi part in browser
[root@rc-009 lightsquid]#
Pls note you may need to install perl “CGI” and “GD” library. GD is an optional to enable graph support. Sometime you may get error as follows,
Can’t locate CGI.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
Solution is
[root@rc-009 lightsquid]# perl -MCPAN -e shell
Terminal does not support AddHistory.
cpan shell -- CPAN exploration and modules installation (v1.7602)
ReadLine support available (try 'install Bundle::CPAN')
cpan> install CGI
cpan> install GD
B. Set the scheduler to parse the squid log file.
a. Open the “lighsquid.cfg ” file and verify the squid log path is correctly set. You may also change the certain values as you wish like to get best graph size change the value to “$graphmaxall=3.50*(1024*1024*1024);” etc.
  $logpath             ="/var/log/squid";
b. Set the cronjob as follows
#crontab -l
        */50 * * * * /usr/bin/perl /var/www/html/lightsquid/lightparser.pl >/dev/null 2>&<code>
<strong>C. Customize the User-IP mapping file</strong>
      You need to  add all the users entry inside the "realname.cfg" file 
       Eg: < IP>    <User name >
      <code>[root@rc-009 lightsquid]# grep "Liju"  realname.cfg
      192.168.0.14    Liju
You may also create groups by editing group.cfg. Add the entry like this
#cat  group.cfg
           Liju      01 SysAdmin
           Arun    01   SysAdmin
           Jacob  02    Support 
           Tom   02         Support
That’s it. Try to run the parser to get first report.
/usr/bin/perl /var/www/html/lightsquid/lightparser.pl
Now it’s your turn to keep eye on user’s activity. Access the lightsquid over the ip ie http://squidserver ip/lightsquid

Thanks 



Monday, April 29, 2013

How To Block File Uploads Using Squid ACL’s


This article explains how to block someone from uploading files to a website such as Gmail or Hotmail using Squid with a simple shell script. The key feature of this process is that because we’re using an ACL, we can apply this rule to groups of users and computers as we would any other ACL.

Install Squid:
apt-get install squid
Edit the squid configuration file “/etc/squid/squid.conf” to look like the following:
acl all src all
http_port 3128
access_log /var/log/squid/access.log squid

external_acl_type request_body %{Content-Length} /usr/bin/upload.sh
# 1MB max upload
acl noupload external request_body 1024000

http_access deny !noupload
http_access allow all
Now create your script file:
touch /usr/bin/upload.sh
chmod 755 /usr/bin/upload.sh
Add the following content to your new script file “/usr/bin/upload.sh”:
#!/bin/sh
while read size limit; do
  if [ "${size}" -gt "${limit}" ]; then
    echo ERR
  else
    echo OK
  fi
done
Now start (restart) Squid:
/etc/init.d/squid start

Wednesday, April 3, 2013

Installation & Configuration in OTRS @ REDHAT/CENTOS



Hi   Today we are going to discuss OTRS  installation and configuration in REDHAT/CENOS

Download noarch.rpm from http://www.otrs.com/en/open-source/get-otrs/software-download/

Prerequisites

Before installing OTRS, we have to do couple of prerequisites first

Install and enable EPEL repository.

First go to the EPEL repository download page. Download the latest EPEL rpm and install it as shown below.
# wget http://epel.mirror.net.in/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -Uvh epel-release-6-8.noarch.rpm
Log in as root user and Install Mysql server using the following command:
yum install mysql-server
Start mysql service as shown below:
service mysqld start
chkconfig mysqld on
By default, Mysql root user is blank. So let us setup the root user password as shown below:
mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
 SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): -----> Press Enter
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

You already have a root password set, so you can safely answer 'n'.

Change the root password? [Y/n] y -----> Enter Y and press Enter
 New password: -----> Enter the new password
 Re-enter new password: -----> Enter password again
 Password updated successfully!
 Reloading privilege tables..
 ... Success!

By default, a MySQL installation has an anonymous user, allowing anyone
 to log into MySQL without having to have a user account created for
 them.  This is intended only for testing, and to make the installation
 go a bit smoother.  You should remove them before moving into a
 production environment.

Remove anonymous users? [Y/n] y -----> Press Enter
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
 ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y -----> Press Enter
 ... Success!

By default, MySQL comes with a database named 'test' that anyone can
 access.  This is also intended only for testing, and should be removed
 before moving into a production environment.

Remove test database and access to it? [Y/n] y -----> Press Enter
 - Dropping test database...
 ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist
 ... Failed!  Not critical, keep moving...
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
 will take effect immediately.

Reload privilege tables now? [Y/n] y -----> Press Enter
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MySQL
 installation should now be secure.

Thanks for using MySQL!
MySQL has been installed successfully with default options. In order to work properly with OTRS, we have to add the following directives into the my.cnf file.
Edit file /etc/my.cnf,
vi /etc/my.cnf
Add the following lines under the [mysqld] section:
max_allowed_packet=20M
query_cache_size=32M
Save and close the file.
Next, restart mysql service using the following command:
service mysqld restart
Next, Install httpd package with command:
yum install httpd
Start httpd service, and make it to start automatically on every reboot.
service httpd start
chkconfig httpd on

Download OTRS

Go to the OTRS download page and download the latest version.
wget http://ftp.otrs.org/pub/otrs/RPMS/rhel/6/otrs-3.3.6-01.noarch.rpm
The above will download and save the OTRS rpm file in the current directory. Install it using command:
yum install otrs-3.3.6-01.noarch.rpm
The above command will install otrs package along with all required packages.
Finally, restart httpd service one more time after installing OTRS.
service httpd restart
During OTRS installation, keep attention on the installer. It will display the web installer URL for OTRS.
Look at the following screenshot.
root@server:~_001

Install Additional PERL modules

Before proceeding to configure OTRS, you should install additional perl modules. Run the following command to know the required modules by OTRS:
/opt/otrs/bin/otrs.CheckModules.pl
Sample output:
o Crypt::Eksblowfish::Bcrypt.......Not installed! (optional - For strong password hashing.)
 o Crypt::SSLeay....................ok (v0.57)
 o Date::Format.....................ok (v2.22)
 o DBI..............................ok (v1.609)
 o DBD::mysql.......................ok (v4.013)
 o DBD::ODBC........................Not installed! (optional - Required to connect to a MS-SQL database.)
 o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.)
 o DBD::Pg..........................Not installed! (optional - Required to connect to a PostgreSQL database.)
 o Encode::HanExtra.................Not installed! (optional - Required to handle mails with several Chinese character sets.)
 o GD...............................Not installed! (optional - Required for stats.)
 o GD::Text.......................Not installed! (optional - Required for stats.)
 o GD::Graph......................Not installed! (optional - Required for stats.)
 o IO::Socket::SSL..................ok (v1.31)
 o JSON::XS.........................Not installed! (optional - Recommended for faster AJAX/JavaScript handling.)
 o List::Util::XS...................ok (v1.21)
 o LWP::UserAgent...................ok (v6.05)
 o Mail::IMAPClient.................Not installed! (optional - Required for IMAP TLS connections.)
 o IO::Socket::SSL................ok (v1.31)
 o ModPerl::Util....................ok (v2.000004)
 o Net::DNS.........................ok (v0.65)
 o Net::LDAP........................ok (v0.40)
 o Net::SSL.........................ok (v2.84)
 o PDF::API2........................Not installed! (optional - Required for PDF output.)
 o Compress::Zlib.................ok (v2.021)
 o Text::CSV_XS.....................Not installed! (optional - Recommended for faster CSV handling.)
 o Time::HiRes......................ok (v1.9721)
 o XML::Parser......................ok (v2.36)
 o YAML::XS.........................Not installed! (required - Please install this module - )
As you see in the above output, some perl modules are missing. Install them all at once or one by one as shown below.
yum install "perl(Crypt::Eksblowfish::Bcrypt)" "perl(DBD::ODBC)" "perl(DBD::Oracle)" "perl(DBD::Pg)" "perl(Encode::HanExtra)" "perl(GD)" "perl(GD::Text)" "perl(GD::Graph)" "perl(JSON::XS)" "perl(Mail::IMAPClient)" "perl(PDF::API2)" "perl(Text::CSV_XS)" "perl(YAML::XS)"

If it is not working your can install through perl promt:

Before make sure 

yum install make gcc gd gd-devel

# perl -MCPAN -e shell;

cpan[15]> help

cpan[15]>  install YAML::XS

Now, check again for any missing modules.
/opt/otrs/bin/otrs.CheckModules.pl
Sample output:
o Crypt::Eksblowfish::Bcrypt.......ok (v0.009)
 o Crypt::SSLeay....................ok (v0.57)
 o Date::Format.....................ok (v2.22)
 o DBI..............................ok (v1.609)
 o DBD::mysql.......................ok (v4.013)
 o DBD::ODBC........................ok (v1.48)
 o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.)
 o DBD::Pg..........................ok (v2.15.1)
 o Encode::HanExtra.................ok (v0.23)
 o GD...............................ok (v2.44)
 o GD::Text.......................ok (v0.86)
 o GD::Graph......................ok (v1.44)
 o IO::Socket::SSL..................ok (v1.31)
 o JSON::XS.........................ok (v2.27)
 o List::Util::XS...................ok (v1.21)
 o LWP::UserAgent...................ok (v6.05)
 o Mail::IMAPClient.................ok (v3.34)
 o IO::Socket::SSL................ok (v1.31)
 o ModPerl::Util....................ok (v2.000004)
 o Net::DNS.........................ok (v0.65)
 o Net::LDAP........................ok (v0.40)
 o Net::SSL.........................ok (v2.84)
 o PDF::API2........................ok (v2.019)
 o Compress::Zlib.................ok (v2.021)
 o Text::CSV_XS.....................ok (v0.85)
 o Time::HiRes......................ok (v1.9721)
 o XML::Parser......................ok (v2.36)
 o YAML::XS.........................ok (v0.38)
If everything seems good, proceed to web installer.

Begin OTRS Web installer

OTRS development team has made a simple way web based installer to make the installation lot easier.
Open up the web browser and navigate to http://ip-address/otrs/installer.pl.
The following screen will appear. Click Next to continue.
Configuring the database

The simple way - Using the web installer (works only with MySQL)

If you use MySQL as the database back-end, you can use the OTRS web installer: http://localhost/otrs/installer.pl .
When the web installer starts, please follow the next steps to setup your system:
1. Check out the information about the OTRS offices and click on next to continue (see Figure below).
Figure: Welcome screen.
2. Read the GNU Affero General Public License (see Figure below) and accept it, by clicking the corresponding button at the bottom of the page.
Figure: GNU Affero General Public License.
3. Provide the username and password of the administrator, the DNS name of the computer which hosts OTRS and the type of database system to be used. After that, check the settings (see Figure below).
Figure: Database initial settings.
You will be notified if the check was successful. Press OK to continue (see Figure below).
Figure: Notification for successful check.
4. Create a new database user, choose a name for the database and click on 'Next' (see Figure below).

Warning

It is never a good idea to use default passwords. Please change the default password for the OTRS database!
Figure: Database settings.
If the database and its user were successfully created, you will get a setup notification, as shown in Figure. Click 'Next' to go to the next screen.
Figure: Notification indicating successful database setup.
5. Provide all the required system settings and click on 'Next' (see Figure below).
Figure: System settings.
6. If you want, you can provide the needed data to configure your inbound and outbound mail, or skip this step by pressing the right button at the bottom of the screen (see Figure below).
Figure: Mail configuration.
7. Restart the OTRS service now to use the new configuration settings as shown in the script below.
linux:~ # rcotrs restart-force
Shutting down OTRS
 Disable /opt/otrs/bin/otrs.PostMaster.pl ... done.
no crontab for otrs
 Shutting down cronjobs ... failed!
Shutting down OTRS (completely)
 Shutting down Apache ... done.
 Shutting down MySQL ... done.
                                                                     done
Starting OTRS (completely)
 Starting Apache ... done.
 Starting MySQL ... done.
Starting OTRS
 Checking Apache ... done.
 Checking MySQL ... done.
 Checking database connect... (It looks Ok!).
 Enable /opt/otrs/bin/otrs.PostMaster.pl ... done.
 Checking otrs spool dir...  done.
 Creating cronjobs (source /opt/otrs/var/cron/*) ... done.

  -->> http://linux.example.com/otrs/index.pl <<--
                                                                     done
                                                                     done
linux:~ #
Script: Restarting the OTRS service.
Congratulations! Now the installation of OTRS is finished and you should be able to work with the system (see Figure below). To log into the web interface of OTRS, use the address http://localhost/otrs/index.pl from your web browser. Log in as OTRS administrator, using the username 'root@localhost' and the password 'root'. After that you can configure the system for your needs.




Thanks :- http://doc.otrs.org/3.1/en/html/manual-installation-of-otrs.html

For Troubleshooting

Suppose a package perl package as missing  like

YAML::XS.........................Not installed! (required - use "perl -MCPAN -e shell;" - )

Run   perl -MCPAN -e shell;

use   h for help

update all perl package

install YAML::XS   -> For installing yaml::XS pakage

Wednesday, March 20, 2013

Master Linux Command Line History


1. Display timestamp using HISTTIMEFORMAT

Typically when you type history from command line, it displays the command# and the command. For auditing purpose, it may be beneficial to display the timepstamp along with the command as shown below.
# export HISTTIMEFORMAT='%F %T '
# history | more
1  2008-08-05 19:02:39 service network restart
2  2008-08-05 19:02:39 exit
3  2008-08-05 19:02:39 id
4  2008-08-05 19:02:39 cat /etc/redhat-release

2. Search the history using Control+R

I strongly believe, this may be your most frequently used feature of history. When you’ve already executed a very long command, you can simply search history using a keyword and re-execute the same command without having to type it fully. Press Control+R and type the keyword. In the following example, I searched for red, which displayed the previous command “cat /etc/redhat-release” in the history that contained the word red.
# [Press Ctrl+R from the command prompt,
which will display the reverse-i-search prompt]
(reverse-i-search)`red': cat /etc/redhat-release
[Note: Press enter when you see your command,
which will execute the command from the history]
# cat /etc/redhat-release
Fedora release 9 (Sulphur)
Sometimes you want to edit a command from history before executing it. For e.g. you can search for httpd, which will display service httpd stop from the command history, select this command and change the stop to start and re-execute it again as shown below.
# [Press Ctrl+R from the command prompt,
which will display the reverse-i-search prompt]
(reverse-i-search)`httpd': service httpd stop
[Note: Press either left arrow or right arrow key when you see your
command, which will display the command for you to edit, before executing it]
# service httpd start

3. Repeat previous command quickly using 4 different methods

Sometime you may end up repeating the previous commands for various reasons. Following are the 4 different ways to repeat the last executed command.
  1. Use the up arrow to view the previous command and press enter to execute it.
  2. Type !! and press enter from the command line
  3. Type !-1 and press enter from the command line.
  4. Press Control+P will display the previous command, press enter to execute it

4. Execute a specific command from history

In the following example, If you want to repeat the command #4, you can do !4 as shown below.
# history | more
1  service network restart
2  exit
3  id
4  cat /etc/redhat-release

# !4
cat /etc/redhat-release
Fedora release 9 (Sulphur)

5. Execute previous command that starts with a specific word

Type ! followed by the starting few letters of the command that you would like to re-execute. In the following example, typing !ps and enter, executed the previous command starting with ps, which is ‘ps aux | grep yp’.
# !ps
ps aux | grep yp
root     16947  0.0  0.1  36516  1264 ?        Sl   13:10   0:00 ypbind
root     17503  0.0  0.0   4124   740 pts/0    S+   19:19   0:00 grep yp

6. Control the total number of lines in the history using HISTSIZE

Append the following two lines to the .bash_profile and relogin to the bash shell again to see the change. In this example, only 450 command will be stored in the bash history.
# vi ~/.bash_profile
HISTSIZE=450
HISTFILESIZE=450

7. Change the history file name using HISTFILE

By default, history is stored in ~/.bash_history file. Add the following line to the .bash_profile and relogin to the bash shell, to store the history command in .commandline_warrior file instead of .bash_history file. I’m yet to figure out a practical use for this. I can see this getting used when you want to track commands executed from different terminals using different history file name.
# vi ~/.bash_profile
HISTFILE=/root/.commandline_warrior
If you have a good reason to change the name of the history file, please share it with me, as I’m interested in finding out how you are using this feature.

8. Eliminate the continuous repeated entry from history using HISTCONTROL

In the following example pwd was typed three times, when you do history, you can see all the 3 continuous occurrences of it. To eliminate duplicates, set HISTCONTROL to ignoredups as shown below.
# pwd
# pwd
# pwd
# history | tail -4
44  pwd
45  pwd
46  pwd [Note that there are three pwd commands in history, after
executing pwd 3 times as shown above]
47  history | tail -4

# export HISTCONTROL=ignoredups
# pwd
# pwd
# pwd
# history | tail -3
56  export HISTCONTROL=ignoredups
57  pwd [Note that there is only one pwd command in the history, even after
executing pwd 3 times as shown above]
58  history | tail -4

9. Erase duplicates across the whole history using HISTCONTROL

The ignoredups shown above removes duplicates only if they are consecutive commands. To eliminate duplicates across the whole history, set the HISTCONTROL to erasedups as shown below.
# export HISTCONTROL=erasedups
# pwd
# service httpd stop
# history | tail -3
38  pwd
39  service httpd stop
40  history | tail -3

# ls -ltr
# service httpd stop
# history | tail -6
35  export HISTCONTROL=erasedups
36  pwd
37  history | tail -3
38  ls -ltr
39  service httpd stop
[Note that the previous service httpd stop after pwd got erased]
40  history | tail -6

10. Force history not to remember a particular command using HISTCONTROL

When you execute a command, you can instruct history to ignore the command by setting HISTCONTROL to ignorespace AND typing a space in front of the command as shown below. I can see lot of junior sysadmins getting excited about this, as they can hide a command from the history. It is good to understand how ignorespace works. But, as a best practice, don’t hide purposefully anything from history.
# export HISTCONTROL=ignorespace
# ls -ltr
# pwd
#  service httpd stop [Note that there is a space at the beginning of service,
to ignore this command from history]
# history | tail -3
67  ls -ltr
68  pwd
69  history | tail -3

11. Clear all the previous history using option -c

Sometime you may want to clear all the previous history, but want to keep the history moving forward.
# history -c

12. Subtitute words from history commands

When you are searching through history, you may want to execute a different command but use the same parameter from the command that you’ve just searched.
In the example below, the !!:$ next to the vi command gets the argument from the previous command to the current command.
# ls anaconda-ks.cfg
anaconda-ks.cfg
# vi !!:$
vi anaconda-ks.cfg
In the example below, the !^ next to the vi command gets the first argument from the previous command (i.e cp command) to the current command (i.e vi command).
# cp anaconda-ks.cfg anaconda-ks.cfg.bak
anaconda-ks.cfg
# vi  !^
vi anaconda-ks.cfg

13. Substitute a specific argument for a specific command.

In the example below, !cp:2 searches for the previous command in history that starts with cp and takes the second argument of cp and substitutes it for the ls -l command as shown below.
# cp ~/longname.txt /really/a/very/long/path/long-filename.txt
# ls -l !cp:2
ls -l /really/a/very/long/path/long-filename.txt
In the example below, !cp:$ searches for the previous command in history that starts with cp and takes the last argument (in this case, which is also the second argument as shown above) of cp and substitutes it for the ls -l command as shown below.
# ls -l !cp:$
ls -l /really/a/very/long/path/long-filename.txt

14. Disable the usage of history using HISTSIZE

If you want to disable history all together and don’t want bash shell to remember the commands you’ve typed, set the HISTSIZE to 0 as shown below.
# export HISTSIZE=0
# history
# [Note that history did not display anything]

15. Ignore specific commands from the history using HISTIGNORE

Sometimes you may not want to clutter your history with basic commands such as pwd and ls. Use HISTIGNORE to specify all the commands that you want to ignore from the history. Please note that adding ls to the HISTIGNORE ignores only ls and not ls -l. So, you have to provide the exact command that you would like to ignore from the history.
# export HISTIGNORE="pwd:ls:ls -ltr:"
# pwd
# ls
# ls -ltr
# service httpd stop

# history | tail -3
79  export HISTIGNORE="pwd:ls:ls -ltr:"
80  service httpd stop
81  history
[Note that history did not record pwd, ls and ls -ltr]
Thanks http://www.thegeekstuff.com

Fedora 15 nVidia Drivers Install Guide (disable nouveau driver)

          This guide works with GeForce 6/7/8/9/200/300 series cards and also with GeForce FX cards.           Fedora  nVidia driver installation is not much different from previous Fedora versions. I have tested this guide with a couple computers, so let me know, if you have some problems.


Install nVidia proprietary drivers on Fedora 15 and disable the nouveau driver

1. Change root user

su -
## OR ##
sudo -i

2. Make sure that you are running latest kernel

If not then update kernel and reboot
yum update kernel*
reboot

3. Add RPMFusion Repositories (Free and Non-Free)

32-bit
rpm -Uvh http://download1.rpmfusion.org/free/fedora/development/i386/os/rpmfusion-free-release-15-1.noarch.rpm
rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/development/i386/os/rpmfusion-nonfree-release-15-1.noarch.rpm
64-bit
rpm -Uvh http://download1.rpmfusion.org/free/fedora/development/x86_64/os/rpmfusion-free-release-15-1.noarch.rpm
rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/development/x86_64/os/rpmfusion-nonfree-release-15-1.noarch.rpm

4. Install nVidia proprietary drivers

Select 4a. (GeForce 6/7/8/9/200/300/400/500) or 4b. (GeForce FX) depending on your card

4a. Install nVidia proprietary drivers for GeForce 6/7/8/9/200/300/400/500 series cards

Select kmod, kmod-PAE or akmod from following.
kmod-nvidia
yum install kmod-nvidia xorg-x11-drv-nvidia-libs
or
kmod-nvidia-PAE and PAE-kernel devel
yum install kernel-PAE-devel kmod-nvidia-PAE
or
akmod-nvidia
yum install akmod-nvidia xorg-x11-drv-nvidia-libs
akmod is good option and easy way avoid problems on kernel updates and is best and only option if you use:
  • self-compiled kernel
  • older Fedora kernel
  • quickly changing kernels from updates-testing/rawhide
Full spec of kmod and akmod differences, check this.

4b. Install nVidia proprietary drivers for GeForce FX cards

Select kmod, kmod-PAE or akmod from following.
kmod-nvidia
yum install kmod-nvidia-173xx xorg-x11-drv-nvidia-173xx-libs.i686
or
kmod-nvidia-PAE and PAE-kernel devel
yum install kernel-PAE-devel kmod-nvidia-173xx-PAE
or
akmod-nvidia
yum install akmod-nvidia-173xx xorg-x11-drv-nvidia-173xx-libs.i686
akmod is good option and easy way avoid problems on kernel updates and is best and only option if you use:
  • self-compiled kernel
  • older Fedora kernel
  • quickly changing kernels from updates-testing/rawhide
Full spec of kmod and akmod differences, check this.