Friday, July 15, 2011

Mount Remote folder using SSH(sshfs)


It’s possible to mount any Remote directory using SSH with sshfs utility(command). It’s Very Easy. This Steps you can follow for Fedora 10, Ubuntu 8.10 and Ubuntu 9.04 Linux.
First Let us know something about SSHFS.

What is SSHFS?

SSHFS allows you to conect to any host that supports SSH and mount the remote directory in your local directory. This means you will be able to access files as if they were on your own system and best of all the transactions are encrypted using SSH.
This is much faster, easier, and more effecient than using FTP. Still Some people are actually using regular FTP to transfer files. The problem with FTP is that not only are your files sent in clear text but username and password are also in plain sight for anyone to can see it.

For Fedora 10 :-

Step 1 :- Login as a root by executing following command from user.
[itsolutions@]$ su – root
Step 2 :- Execute Following command to install SSHFS on your Fedora Box.
[root@]# yum -y install sshfs*
Step 3:- Once Installation Done Login as a user now.Now Create One Local Directory(Where you want to mount Remote Directory). (You can also mount to your existing directory)[root@]# su – itsolutions
[itsolutions@]$ mkdir ~/SSHFS
Step 4:- Now Execute command to mount remote directory into Local Directory.
[itsolutions@]$ sshfs root@192.168.100.55:/home/itsolutions/ ~/SSHFS. (sshfs username@ssh-server-ip:/directory-you-want-mount
Step 5 :- It will ask your for password of user which you have provided.Now Check your ~/SSHFS ( Local Directory where you mounted SSH Remote Folder).You will able to see Your all files into ~/SSHFS

For Ubuntu 8.10 and Ubuntu 9.04

Step 1 :- Login as a root by executing following command from user.
itsolutions@:~$ su – root
Step 2 :- Execute Following command to install SSHFS on your Fedora Box.
root@:~# apt-get install sshfs -y
Step 3:- Once Installation Done Login as a user now.Now Create One Local Directory(Where you want to mount Remote Directory). (You can also mount to your existing directory)root@ask4itsolutions.com:~# su – itsolutions
itsolutions@:~$ mkdir ~/SSHFS
Step 4:- Now Execute command to mount remote directory into Local Directory.
itsolutions@:~$ sshfs root@192.168.100.55:/home/itsolutions/ ~/SSHFS. (sshfs username@ssh-server-ip:/directory-you-want-mount
Step 5 :- It will ask your for password of user which you have provided.Now Check your ~/SSHFS ( Local Directory where you mounted SSH Remote Folder).You will able to see Your all files into ~/SSHFS

Disable (Block) CD/DVD ROM Linux ( RHEL )

Below procedure is working fine on RHEL ( Red Hat Enterprise Linux 5).
1) You need to be root user to perform steps.
[blog@ask4it]$  su -
2) Go to Directory Where your kernel drivers stored. Follow exact command.
[root@ask4it]# cd /lib/modules/$(uname -r)/kernel/drivers/cdrom
3) Now list directory.
[root@ask4it cdrom]# ls
cdrom.ko
4) Now rename or delete cdrom.ko file with following command.
[root@ask4it cdrom]# mv cdrom.ko cdrom.ko-ok
To Delete file execute below command
[root@ask4it cdrom]# rm -rf cdrom.ko
5) Now reboot your computer and Insert CD or DVD into Drive. It will not detect.
6) If you dont want to reboot your computer then just execute below command.
modprobe -r sr_mod
Hope this helps you

Login as a root from GUI on Fedora 15


Fedora 15 released and I am posting solution for root lovers who like to login with root. Fedora 15 root login is exactly same like Fedora 14 root login.
WARNING :- Its not at all good to login as root from GUI. It’ DANGEROUS. BUT if some one wants to know that how to login as a root from GUI then follow the instructions.
In Fedora 15 You cannot login as a root from gui. By Default, only Normal users are allowed to login from gui mode.
I Managed to Login as a root from GUI on Fedora 15. Follow these steps and you will able to Login as a root from GUI on Fedora 15
If You want to login as a root from GUI in Fedora 15 then you have to edit something like some files which are located to /etc/pam.d/
Open your Te rminal from Applications -> System Tools -> Terminal
Now Login as a root from your terminal
Step 1 :- [itsolutions@ask4itsolutions.com]$ su – root
Password:-
Step 2:- Now go to your /etc/pam.d/ directory.
[root@ask4itsolutions]# cd /etc/pam.d/
Then first take a backup of gdm file
cp gdm gdm.bkp ( always take backup if anything goes wrong you can correct it by original file)
Step 3 :- Now Open gdm file in your favourite editor. I am using vi as my editor.
[root@ask4itsolutions pam.d]# vi gdm
Find and Comment or remove this line into your gdm file
auth required pam_succeed_if.so user != root quiet
Step 4 :- Save & Exit From that File. ( In Fedora10 Till step 4 is enough to Login as a root from GUI but for Fedora 15 you need one more file to edit otherwise you cannot Login as a root even though you edited gdm file).
Step 5 :- Here is the additional file that you need to edit and that file name is gdm-password. Open gdm-password file in your favourite editor. I am using vi as my editor.
Then first take a backup of gdm-password file
cp gdm-password gdm-password.bkp ( always take backup if anything goes wrong you can correct it by original file)
[root@ask4itsolutions.com pam.d]#vi gdm-password
Find and Comment or remove this line into your gdm file
auth required pam_succeed_if.so user != root quiet

Step 6 :- Save & Exit from File. Now Logout and Try to Login as a root user. Now you are able to Login as a root user from GUI in Fedora 15.

Download CentOS 6.0 ISO | 32 & 64 Bit


Finally CentOS 6 Final Version is now released and Available to Download.
Its Good News for all RHEL users who likes to Use its Clone But right now we don’t know how much stable it is and how exactly it matches RHEL 6.
We are pleased to announce the immediate availability of CentOS 6.0 for i386 and x86_64 architectures. CentOS 6.0 is based on the upstream release EL 6.0 and includes packages from all variants. All upstream repositories have been combined into one, to make it easier for end users to work with. Since upstream has a 6.1 version already released, we will be using a Continuous Release repository for 6.0 to bring all 6.1 and post 6.1 security updates to all 6.0 users, till such time as CentOS 6.1 is released
Now Downloads for CentOS 6 is available, You can download it from following links, Let me know if you face any errors so i will provide some other links too.
We are pleased to announce the immediate availability of CentOS 6.0 for i386 and x86_64 architectures. CentOS 6.0 is based on the upstream release EL 6.0 and includes packages from all variants. All upstream repositories have been combined into one, to make it easier for end users to work with. Since upstream has a 6.1 version already released, we will be using a Continuous Release repository for 6.0 to bring all 6.1 and post 6.1 security updates to all 6.0 users, till such time as CentOS 6.1 is released