Archive for the ‘Linux’ Category
Ubuntu saving online banking
CNL bank plans to distribute pre configured live cd with ubuntu for its customers of online banking.
Read here:
http://blogs.computerworld.com/15815/can_ubuntu_save_online_banking
Install and Configure denyhosts on Ubuntu 8.04 Hardy Heron
Having OpenSSH deamon running is a great thing as you have an access to your Ubuntu shell from anywhere. Unfortunately there are some people that are running tools which scan IP addresses and check open ports. If the tool finds that you have ssh running it will start attacking your server trying to login using dictionary attack or brute force. You will see it in /var/log/auth.log
| sshd[25299]: Failed password for invalid user apple from 218.102.23.197 port 42909 ssh2 sshd[25301]: pam_winbind(ssh:auth): getting password (0×00000000) sshd[25301]: pam_winbind(ssh:auth): request failed: No such user, PAM error was User not known to the underlying authentication module (10), NT error was NT_STATUS_NO_SUCH_USER sshd[25301]: pam_unix(ssh:auth): unrecognized option [bullok_secure] Aug 6 21:40:59 luna sshd[25301]: pam_unix(ssh:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=imsp007.netvigator.com user=root sshd[25301]: Failed password for root from 218.102.23.197 port 42970 ssh2 sshd[25303]: Invalid user brian from 218.102.23.197 sshd[25303]: pam_winbind(ssh:auth): getting password (0×00000000) sshd[25303]: pam_winbind(ssh:auth): request failed: No such user, PAM error was User not known to the underlying authentication module (10), NT error was NT_STATUS_NO_SUCH_USER sshd[25303]: pam_unix(ssh:auth): unrecognized option [bullok_secure] sshd[25303]: pam_unix(ssh:auth): check pass; user unknown sshd[25303]: pam_unix(ssh:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=imsp007.netvigator.com |
This is an authentic example from my friend’s server that was configured to authenticate with Active Directory in Windows 2003.
And that’s how they get you:
| sshd[23781]: pam_winbind(ssh:auth): getting password (0×00000000) sshd[23781]: pam_winbind(ssh:auth): user ‘jane’ granted access sshd[23781]: pam_winbind(ssh:account): user ‘jane’ OK sshd[23781]: pam_winbind(ssh:account): user ‘jane’ granted access sshd[23781]: Accepted password for jane from 172.173.13.22 port 1190 ssh2 |
The cure:
You can close port 22, but that will not allow you to login or install denyhosts which is a great python script used to prevent brute force hacking of your SSH server.
This instructions are for Hardy Heron 8.04:
1. Install denyhosts:
| sudo apt-get install denyhosts |
2. Edit the denyhosts configuration file:
| sudo nano /etc/denyhosts.conf |
| # never purge: PURGE_DENY = # # purge entries older than 1 week #PURGE_DENY = 1w # # purge entries older than 5 days PURGE_DENY = 5d # To block all services for the offending host: # To block only sshd: |
And that’s all! If you would like to go deeper into the configuration, check this link:
http://denyhosts.sourceforge.net/faq.html

Resetting Forgotten Mysql Password on Debian/Ubuntu
Debian:
1.Log in as root
2.root@deathstar:~# /etc/init.d/mysql stop
3.mysqld_safe –skip-grant-tables &
[1] 5216
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[5253]: started
4. root@deathstar:~$ mysql –user=root mysql
Enter password:
6. Hit enter
5. mysql> update user set Password=PASSWORD(‘new-password-here’) WHERE User=’root’;
Query OK, 2 rows affected (0.04 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)
mysql> exit
Bye
5. /etc/init.d/mysql restart
Ubuntu:
Repeat all steps with command sudo
artur@tatooine:~# sudo /etc/init.d/mysql stop
[sudo] password for artur:
etc.

Configuring SSH on Debian GNU/Linux 4.0
1. Login as root
2. Install OpenSSH by running command:
apt-get install ssh
3. open file /etc/ssh/sshd_config and add these values:
#Authentication
PermitRootLogin no
MaxAuthTries 2
First one blocks access for root, so then you can login with a standard account and hit su to switch to the root user. Second one disconnects from the session after two failed login attempts.
You can also add this line:
AllowUser your_username
It allows only specified user to log in using ssh. After logging in as a standard user just su and you have all root privileges.
![]()
Unix / Linux Jokes
Today posting some cool unix/linux/programming jokes that I found on the net.Enjoy!
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Microsoft: “You’ve got questions. We’ve got dancing paperclips.”
Failure is not an option — it comes bundled with Windows.
Sexy Unix Commands: date; unzip; touch; strip; finger; mount; gasp; yes; uptime;
Q: What is the difference between Windows 95 and Windows 98? A: 3 years
Q: How does Bill Gates screw in a lightbulb?
A: He doesn’t. He declares darkness the industry standard.
“If at first you don’t succeed; call it version 1.0″
“If Python is executable pseudocode, then perl is executable line noise.”
“The more I C, the less I see.”
“To err is human… to really foul up requires the root password.”
“After Perl everything else is just assembly language.”
“If brute force doesn’t solve your problems, then you aren’t using enough.”
“Life would be so much easier if we only had the source code.”
“Unix is user-friendly. It’s just very selective about who its friends are.”
“COBOL programmers understand why women hate periods.”
“Programming is like sex, one mistake and you have to support it for the rest of your life.” — Michael Sinz
“There are 10 types of people in the world: those who understand binary, and those who don’t.”
“SUPERCOMPUTER: what it sounded like before you bought it.”
“Windows95: It’s like upgrading from Reagan to Bush.
“The best accelerator available for a Mac is one that causes it to go at 9.81 m/s2.”
“A computer lets you make more mistakes faster than any invention in human history – with the possible exceptions of handguns and tequila”
“1f u c4n r34d th1s u r34lly n33d t0 g37 l41d”
“A Windows user spends 1/3 of his life sleeping, 1/3 working, 1/3 waiting.”
“My software never has bugs. It just develops random features.”
“Better to be a geek than an idiot.”
“Windows isn’t a virus, viruses do something.”
“Difference between a virus and windows ? Viruses rarely fail.”
“Evolution is God’s way of issuing upgrades.”
“The only problem with troubleshooting is that sometimes trouble shoots back.”
“The box said ‘Required Windows 95 or better’. So, I installed LINUX.”
“Computer are like air conditioners: they stop working when you open windows.”
“Dating a girl is just like writing software. Everything’s going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You’ll be forced to patch the code (admit you’re wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.”
“Real men don’t use backups, they post their stuff on a public ftp server and let the rest of the world make copies.” – Linus Torvalds
“If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.”
“It is easier to change the specification to fit the program than vice versa.”
“I had a fortune cookie the other day and it said: ‘Outlook not so good’. I said: ‘Sure, but Microsoft ships it anyway’.”
“The nice thing about standards is that there are so many to choose from.”
“Programmers are tools for converting caffeine into code.”
“The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones.”
“Hacking is like sex. You get in, you get out, and hope that you didn’t leave something that can be traced back to you.”
Unix / Linux Jokes
Today posting some cool unix/linux/programming jokes that I found on the net.Enjoy!
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Microsoft: “You’ve got questions. We’ve got dancing paperclips.”
Failure is not an option — it comes bundled with Windows.
Sexy Unix Commands: date; unzip; touch; strip; finger; mount; gasp; yes; uptime;
Q: What is the difference between Windows 95 and Windows 98? A: 3 years
Q: How does Bill Gates screw in a lightbulb?
A: He doesn’t. He declares darkness the industry standard.
“If at first you don’t succeed; call it version 1.0″
“If Python is executable pseudocode, then perl is executable line noise.”
“The more I C, the less I see.”
“To err is human… to really foul up requires the root password.”
“After Perl everything else is just assembly language.”
“If brute force doesn’t solve your problems, then you aren’t using enough.”
“Life would be so much easier if we only had the source code.”
“Unix is user-friendly. It’s just very selective about who its friends are.”
“COBOL programmers understand why women hate periods.”
“Programming is like sex, one mistake and you have to support it for the rest of your life.” — Michael Sinz
“There are 10 types of people in the world: those who understand binary, and those who don’t.”
“SUPERCOMPUTER: what it sounded like before you bought it.”
“Windows95: It’s like upgrading from Reagan to Bush.
“The best accelerator available for a Mac is one that causes it to go at 9.81 m/s2.”
“A computer lets you make more mistakes faster than any invention in human history – with the possible exceptions of handguns and tequila”
“1f u c4n r34d th1s u r34lly n33d t0 g37 l41d”
“A Windows user spends 1/3 of his life sleeping, 1/3 working, 1/3 waiting.”
“My software never has bugs. It just develops random features.”
“Better to be a geek than an idiot.”
“Windows isn’t a virus, viruses do something.”
“Difference between a virus and windows ? Viruses rarely fail.”
“Evolution is God’s way of issuing upgrades.”
“The only problem with troubleshooting is that sometimes trouble shoots back.”
“The box said ‘Required Windows 95 or better’. So, I installed LINUX.”
“Computer are like air conditioners: they stop working when you open windows.”
“Dating a girl is just like writing software. Everything’s going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You’ll be forced to patch the code (admit you’re wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.”
“Real men don’t use backups, they post their stuff on a public ftp server and let the rest of the world make copies.” – Linus Torvalds
“If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.”
“It is easier to change the specification to fit the program than vice versa.”
“I had a fortune cookie the other day and it said: ‘Outlook not so good’. I said: ‘Sure, but Microsoft ships it anyway’.”
“The nice thing about standards is that there are so many to choose from.”
“Programmers are tools for converting caffeine into code.”
“The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones.”
“Hacking is like sex. You get in, you get out, and hope that you didn’t leave something that can be traced back to you.”