Wednesday, March 31, 2010

Setting up Yum server with repositry shared on Windows machine ( With Samba server)

Hi all,

          In this artical i am going to install Samba server firstly than with help of samba server i will mount the window share on linux machine further with a windows shared repositry we will configure Yum server . So here we goes..

Step I. First of all extract all Linux package on a windows machine on a folder now share that folder. ( In my case the name of windows machine in "myfileserver'' with IP Address "192.168.5.101", and the linux packhages are in " E:\Softwares\malanchreposerver " now I have shared "E:\Softwares "as "satishkrmalanch$" and to access this share only to a user " satish " and password for the user "Geni0$neverbornYbirth"
 Step II : 
Now install samba server and configure it.
now on linux machine
type following command
mount //192.168.5.101/satishkrmalanch$ /winshare





with this command share will be mounted on /winshare


now creat a repo file in my case "malanch.repo"  and give it path in it as mentioned below:






















You can also permantely mount your windows share on linux by making a credential file containing user name and password for windows  share and then by adding a single line in /etc/fstab file:

# vim /etc/hosts

192.168.5.101   myfileserver


Now creat a password credential file:

#vi /etc/cifspw
username=satish
password=Geni0$neverbornYbirth 
 
Secure this file now:

#Chmod 600 /etc/cifspw

Now enter following into your fstab file to make mount permanent:

//myfileserver/satishkrmalanch$  /winshare  cifs exec,credentials=/etc/cifspw 0 0

 Now make samba service active on startup by this command:
#chkconfig smb on


and now you are done. Make your firewall open for smb ,smb client demon on.

and enjoy to install software with yum command now.
                      Regards
                                  : Satish Malanch





Thursday, January 21, 2010

Configuring YUM server for LInux on Windows FTP server

Hi all,
          In this artical i am going to setup YUM ( Yellowdog Update Modified) server on a Windows based FTP server.Here we go;
First of all copy Full DVD  of your linux distribution on a windows ftp server.
In my case i have copied all the contented of Fedora core-11dvd on my windows ftp server (192.168.5.52\fedora11)
The exact link location is ftp://192.168.5.52/fedora11

Now on Linux system follow the following steps
1. Move all the repo file to a backup location in my case /backup/yum.repod

[root@satish.malanch.com tmp ]# mv /etc/yum.repod/*  /backup/yum.repod/
[root@satish.malanch.com tmp ]# cp /backup/yum.repod/fedora.repo  /etc/yum.repod/satishmalanch.repo

Now edit this file with vim edtior:
root@satish.malanch.com tmp ]# vim /etc/yum.repod/satishmalanch.repo



  Edit the file as shown in above figure.
Now run following command:


[root@satish.malanch.com tmp ]# yum clean all 
Now you have configured the yum repositry on a windows based ftp server on network.
You can now install the packages without any dependancy.


...........................  Satish Kr Malanch







 

Thursday, January 14, 2010

Configuring vsftp Server (FTP server) in Linux ............Satish Malanch

File Transfer Protocol (FTP) is a standard network protocol used to exchange and manipulate files over a TCP/IP based network, such as the Internet. FTP is built on a client-server architecture and utilizes separate control and data connections between the client and server applications. Applications were originally interactive command-line tools with a standardized command syntax, but graphical user interfaces have been developed for all desktop operating systems in use today. FTP is also often used as an application component to automatically transfer files for program internal functions. FTP can be used with user-based password authentication or with anonymous user access.

Types of FTP

 

From a networking perspective, the two main types of FTP are active and passive. In active FTP, the FTP server initiates a data transfer connection back to the client. For passive FTP, the connection is initiated from the FTP client. These are illustrated in Figure 15-1.

Figure : Active And Passive FTP Illustrated


From a user management perspective there are also two types of FTP: regular FTP in which files are transferred using the username and password of a regular user FTP server, and anonymous FTP in which general access is provided to the FTP server using a well known universal login method.
Take a closer look at each type. 



Active FTP

The sequence of events for active FTP is:
  1. Your client connects to the FTP server by establishing an FTP control connection to port 21 of the server. Your commands such as 'ls' and 'get' are sent over this connection.


  2. Whenever the client requests data over the control connection, the server initiates data transfer connections back to the client. The source port of these data transfer connections is always port 20 on the server, and the destination port is a high port (greater than 1024) on the client.

  3. Thus the ls listing that you asked for comes back over the port 20 to high port connection, not the port 21 control connection.


FTP active mode therefore transfers data in a counter intuitive way to the TCP standard, as it selects port 20 as it's source port (not a random high port that's greater than 1024) and connects back to the client on a random high port that has been pre-negotiated on the port 21 control connection.
Active FTP may fail in cases where the client is protected from the Internet via many to one NAT (masquerading). This is because the firewall will not know which of the many servers behind it should receive the return connection.

Passive FTP

Passive FTP works differently:
  1. Your client connects to the FTP server by establishing an FTP control connection to port 21 of the server. Your commands such as ls and get are sent over that connection.


  2. Whenever the client requests data over the control connection, the client initiates the data transfer connections to the server. The source port of these data transfer connections is always a high port on the client with a destination port of a high port on the server.

Passive FTP should be viewed as the server never making an active attempt to connect to the client for FTP data transfers. Because client always initiates the required connections, passive FTP works better for clients protected by a firewall.
As Windows defaults to active FTP, and Linux defaults to passive, you'll probably have to accommodate both forms when deciding upon a security policy for your FTP server.


Configuruing FTP Server in Fedora Core 11 :

Install rpm by yum or rpm command:

[root@satish.malanchlinux.com]#cd /satishdata/install/Packages
[root@satish.malanchlinux.com Packages]#rpm –ivh –adi vsftpd*
Or
[root@satish.malanchlinux.com Packages]#yum  install  *ftp*
Start/Restart vsftpd demon:

[root@satish.malanchlinux.com]#/etc/inid/vsftpd start  
[root@satish.malanchlinux.com]#/etc/inid/vsftpd restart

With Redhat / Fedora you can configure VSFTPD to start at boot you can use the chkconfig command.

[root@satish.malanchlinux.com]# chkconfig vsftpd on

The vsftpd.conf File

VSFTPD only reads the contents of its vsftpd.conf configuration file only when it starts, so you'll have to restart VSFTPD each time you edit the file in order for the changes to take effect. The file may be located in either the /etc or the /etc/vsftpd directories depending on your Linux distribution.
This file uses a number of default settings you need to know about.
  • VSFTPD runs as an anonymous FTP server. Unless you want any remote user to log into to your default FTP directory using a username of anonymous and a password that's the same as their email address, I would suggest turning this off. The configuration file's anonymous_enable directive can be set to no to disable this feature. You'll also need to simultaneously enable local users to be able to log in by removing the comment symbol (#) before the local_enable instruction.


  • If you enable anonymous FTP with VSFTPD, remember to define the root directory that visitors will visit. This is done with the anon_root directive.


anon_root=/data/directory
  • VSFTPD allows only anonymous FTP downloads to remote users, not uploads from them. This can be changed by modifying the anon_upload_enable directive shown later.


  • VSFTPD doesn't allow anonymous users to create directories on your FTP server. You can change this by modifying the anon_mkdir_write_enable directive.


  • VSFTPD logs FTP access to the /var/log/vsftpd.log log file. You can change this by modifying the xferlog_file directive.

  • By default VSFTPD expects files for anonymous FTP to be placed in the /var/ftp directory. You can change this by modifying the anon_root directive. There is always the risk with anonymous FTP that users will discover a way to write files to your anonymous FTP directory. You run the risk of filling up your /var partition if you use the default setting. It is best to make the anonymous FTP directory reside in its own dedicated partition.


The configuration file is fairly straight forward as you can see in the snippet below where we enable anonymous FTP and individual accounts simultaneously.
# Allow anonymous FTP?
anonymous_enable=YES
...
# The directory which vsftpd will try to change
# into after an anonymous login. (Default = /var/ftp)
anon_root=/data/directory
...
# Uncomment this to allow local users to log in.
local_enable=YES
...
# Uncomment this to enable any form of FTP write command.
# (Needed even if you want local users to be able to upload files)
write_enable=YES
...
# Uncomment to allow the anonymous FTP user to upload files. This only
# has an effect if global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
...
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
...
# Activate logging of uploads/downloads.
xferlog_enable=YES
...
# You may override where the log file goes if you like.
# The default is shown below.
xferlog_file=/var/log/vsftpd.log
...
To activate or deactivate a feature, remove or add the # at the beginning of the appropriate line.

Other vsftpd.conf Options

There are many other options you can add to this file:
  • Limiting the maximum number of client connections (max_clients)


  • Limiting the number of connections by source IP address (max_per_ip)


  • The maximum rate of data transfer per anonymous login. (anon_max_rate)


  • The maximum rate of data transfer per non-anonymous login. (local_max_rate)


Descriptions on this and more can be found in the vsftpd.conf man pages.

FTP Security Issues

FTP has a number of security drawbacks, but you can overcome them in some cases. You can restrict an individual Linux user's access to non-anonymous FTP, and you can change the configuration to not display the FTP server's software version information, but unfortunately, though very convenient, FTP logins and data transfers are not encrypted.

The /etc/vsftpd.ftpusers File

For added security, you may restrict FTP access to certain users by adding them to the list of users in the /etc/vsftpd.ftpusers file. The VSFTPD package creates this file with a number of entries for privileged users that normally shouldn't have FTP access. As FTP doesn't encrypt passwords, thereby increasing the risk of data or passwords being compromised, it is a good idea to let these entries remain and add new entries for additional security.

Anonymous Upload

If you want remote users to write data to your FTP server, then you should create a write-only directory within /var/ftp/pub. This will allow your users to upload but not access other files uploaded by other users. The commands you need are:
[root@satish.malanch.com tmp]# mkdir /var/ftp/pub/upload
[root@satish.malanch.com tmp]# chmod 722 /var/ftp/pub/upload

FTP Greeting Banner

Change the default greeting banner in the vsftpd.conf file to make it harder for malicious users to determine the type of system you have. The directive in this file is.

ftpd_banner= Welcome to Satish Malnch ftp services

Client Site access :

In Windows OS you can access the ftp services by typeing ftp server address in your webbrowser:

ie. 

ftp://satish.malanch.com  or   ftp://192.168.5.20

it will prompt you for authonitaction then provide user name and password to login. 

Thursday, January 7, 2010

Some New and Great Features in Fedora 11

Hi Friends,

In this artical i am going to mention some to the new cool and robust featue of Red Hat Fedora core 11.

1. Booting Time :
                             Boot time in this edition is minimum ever.With default software Packages in GNome session the booting time in between boot screen to login screen in less than 20 sec
( In init-5, in Init3 terminal is even fast ).

2.ABRT:
                  Automatic Bug Reporting Tool: Help non-power users with bug reporting, making it as easy as a few mouse clicks.

 3. ext4 file System:

Make ext4 the default files system for anaconda-driven installs (replacing ext3). User should notice generally better performance, and benefit from things like persistent preallocation when using updated torrent clients, etc.Risk of data lose are very less in this file system. GRUB still does not offer Ext4 support under Fedora.
4. Better Surfing with Mozila Firefox 3.5:
                                                                 Firefox has been upgraded to version 3.5 .
5. Gnome Version 2.26
6. KDE Desktop version KDE 4.2
7. Tiger VNC : Tiger VNC is new tool for Remote support

Wednesday, December 30, 2009

Unable to login on Fedora 11 with root user in GUI

I just install linux ( Fedora core -11) after interval of more than 6 months. Just installed Fedora core 11, surprisely there was one more option to create file sytem ext4 ,this file system was new for me.
Now as i finished installation ooooooooooooopsss
I was'nt able to login in GUI as super user. System refelect an error "unable to authoneticate"
Finaly after a littel bit R & D i got solution.Here it is:
 Fedora 10 and above uses pam module called pam_succeed_if.so. This module is designed to succeed or fail authentication based on characteristics of the account belonging to the user being authenticated. One use is to select whether to load other modules based on this test. This module blocks root login using GUI.
to fix this problem


Login as a normal user and open terminal
now give command



[satish@malanch.com]$su

Type your root password. Next, make a backup of /etc/pam.d/gdm, enter:


[root@malanch.com]#cp /etc/pam.d/gdm /root

Now open /etc/pam.d/gdm using gedit or vi text editor, enter:





[root@malanch.com]#vim  /etc/pam.d/gdm

Alternatively, you can do everything in a one command:



su -c 'gedit /etc/pam.d/gdm

Find line that read as follows:



auth required pam_succeed_if.so user != root quiet
Remove or comment out line by prefixing #.



# auth required pam_succeed_if.so user != root quiet

Save and close the file. Logout from terminal and from GUI itself.
now restart ur machine by init 6.
Now you can login to your sytem in GUI with root user. (only in case of Fedora 10)

In case of Fedora 11 you need to edit one more file which is located in /etc/pam.d/gdm-password

[root@malanch.com]#vim /etc/pam.d/gdm-password

Find line that read as follows:


auth required pam_succeed_if.so user != root quiet



Remove or comment out line by prefixing #.




Now restart and enjoy login with root.


                                                                ... Satish Malanch
                                                                     
satishmalanch@gmail.com

Thursday, May 14, 2009

Public clouds fail more visibly!

With great fame and visibility also come great notoriety, at least in the case of failure. Twitter was alive this morning with the tag #gmailfail with comments like "We are receiving reports of major outages on the West Coast and East coast. Canada + UK seem unaffected so far." and "Receiving reports of total Google Services Fail. Maps, News, Apps, Reader, Gmail, all affected. #gmailfail". Some speculation placed the blame on google analytics ("Google service issues across all apps and other web pages appear to be caused by problems with google analytics #gmailfail") while others were speculating that the problem could be with portions of the internet backbone. Some felt it might be the end of the world (" feels very weird to have google and gmail down. Is this a sign of the end of the world? #gmailfail") - are we *really* that dependent on our email and search now? .

There is a summary of activity going on here as well with reports of outages via AT&T. Google notes that the problem affects a small subset of users here. Rumor is, though, you can't see that site if you can't access google. ;)

It will be interesting to see the summary of why but one thing that is clear: the level of visibility in the case of a failure increases rather dramatically. Another observation is that determing root cause of the problem is complex - isolating to a set of affected users, analyzing the connectivity between the users and their cloud based resource and internally at the cloud provider assessing the failure require very good diagnostic skills and access to the data center.

This isn't the first (or last!) cloud outage. And, perhaps the worst problem is that people were deprived of their email for a small number of hours. But perhaps it points out that the cloud isn't ready yet for all workloads.

And a late update: cnet news reports about a connection between YouTube, Google News, and the outage. (Thanks, Nish!)

Another interesting update here that was passed on via facebook. The graph here is very interesting as well with the dramatic traffic drop which implies just how much data is going on over the existing network infrastructure just for email and search driven activities.

Friday, April 10, 2009

Near Final session which covers Lightning talk readouts from some of the working groups

Okay, I was slow and missed some of the updates, so this is more sketchy than I usually am, but here are some of the readouts.

gnome mobile


Maintainers of various projects were able to meet with users of those projects across the vendors. There is a lot of talk of fragmentation across the embedded space, mimo, moblin, mobile can help demonstrate that the fragmentation that exists isn't as dramatic as it may appear.

open printing

Still a shortage of manpower; it would help to have LF be more of a mentor at the google summer of code. We get 10 students for three months from the google summer of code. One will be working on getting JDK into the LSB. One or more will be working on wireless.

There are still some challenges in how openprinting and the distributions integrate the downloading of new drivers for new printers. Continued to discuss the common open printing dialog. There wasn't enough time so next year there is a proposal to start several days before the summit again to provide more time for discussion.

moblin

Open Linux targetted towards mobile technologies. Discussed what components are part of the stack. Includes connman and mojito as two topics. A couple of sessions on clutter (sp?) on using actors and timelines to create an animation in your application. A track on the moblin SDK. Last track was about porting applications to moblin. And a discussion of the changes between moblin v1 and v2. Talked about creating a moblin compliance profile for LSB with the LSB team.

HPC track


9 of the 10 largest computers in the world run Linux. Roughly half of the people who run those sites were present to meet with the Linux Foundation community.

Tracing solution


mostly non-competing, er collaborting projects started yesterday. Christoph Hellwig talked about how they worked to find some agreement on some very low level issues. Members were assigned action items, many of which worked through the night to address their action items for today.

Jim at the summary pitched the upcoming Linux Events that the Linux Foundation is sponsoring.

There are a few sessions this afternoon but the official event ends with this summary. Thanks all for reading (or attending!). And feel free to post pingbacks if you documented any of the sessions that I did not attend.