login to a windows domain from linux

0 comments

for an NT domain, you should have the following in your smb.conf:
netbios name = SAMBA
workgroup = EVALUESERVE
security = domain
password server = IP_address_of_your_DC

you should then be able to do something like:
smbpasswd -j EVALUESERVE -r IP_address_of_your_DC -U NT_ADMINISTRATOR

Windows Active directory
First, make sure kerberos is installed:
# rpm -qa grep krb
this should return at least 3 packages: krb5-devel, krb5-libs and krb5-workstation Next, make sure the ldap development libraries are installed:
# rpm -qa grep ldap-devel
If either of these returns nothing, you'll need to install them - which you can do from the Redhat CD.
make sure there's an entry for your active directory DC in your /etc/hosts file: 1.2.3.4 addc.example.com addc
Next, edit your /etc/krb5.conf to match your site. Everything should be fairly self-explanitory - and everything is case sensitive. Do not comment this file.
Once you've gotten to this point, you can try:
# /usr/kerberos/bin/kinit user@DOMAIN.COM
replacing *user* with a real user and DOMAIN.COM with a real domain (which must be UPPERCASE). If things are working, you'll be prompted for a password. If you enter the correct password, you'll come back to a bash shell, if not, you should be presented with:
"kinit(v5): Preauthentication failed while getting initial credentials"
or some such.
Note: If the clock time on the Linux machine is more than 5 minutes off from the time on the windows machine no ticket information will work. There are three wys to deal with this:
1. Have the Linux server act as a network time server, with the windows machine as a client
2. Have the windows machine act as a time server for the linux client
3. Make both systems pull the time from the same 3rd server ( some are listed here - http://ntp.isc.org/bin/view/Servers/NTPPoolServers )

Next, uninstall samba if it's installed:
# rpm -e samba
get the latest version of samba:
$ wget http://us1.samba.org/samba/ftp/samba-latest.tar.gz
expand and install samba:
$ tar -zxvf samba*.tar.gz
$ cd samba-3.0.13
$ ./configure --prefix=/usr/local/samba --with-ldap --with-ads --with-krb5 --with-pam --with-winbind
# make && make installIn
your smb.conf:
----8<-----
netbios name = LINUX_SERVER_NAME
realm = DOMAIN.COM ads server = 123.123.123.123
security = ADS
encrypt passwords = yes
----8<-----
start samba:
# /etc/rc.d/init.d/smb start
To add the linux computer to the AD, you need to log into the DC and add it as a user with such privledges, so (from the Linux system):
# /usr/local/samba/bin/net ads join -U Administrator
it should prompt you for Administrator's password. Note that Administrator should be a user with the right to add a computer to the AD.
you should see something like:
Joined 'LINUX_MACHINE_NAME' to realm 'DOMAIN.COM'

To verify this worked, go to the windows DC and open Active Directory->Users and Computers and look for your linux machine to be listed there.
That's all you absolutely need to connect to the AD. If you want to map users to the AD (which is probably why you're doing this), open /etc/nsswitch.conf and change this:
passwd: files
shadow: files
group: files
to this:
passwd: compat winbind
shadow: compat
group: compat winbind
start the winbind daemon:
# winbindd
make sure it's running:
# ps -ae grep winbindd
if nothing gets returned, you probably didn't configure samba with kerberos and ldap support. If it shows winbindd running, you're all set. To make sure everything starts on reboot:
open /etc/rc.d/init.d/smb and /etc/rc.d/init.d/winbindd and make sure the line:
# chkconfig: 345 NN NN exixts (NN will be different numbers pertaining to priority), it should be on line 3 of both files. if these lines don't exist, add them. If they read:
# chkconfig: - NN NN change the - to 345 save and close those files and run chkconfig:
# chkconfig smb reset
# chkconfig winbindd reset you can check the runlevels they will start at with # chkconfig smb --list
# chkconfig winbindd --list
That should about cover everything.

Samba Config

0 comments

Samba is a suite of applications and daemon processes used on *nixmachines primarily for communicating with win* machines for sharingfilespace and printers.
Samba is a suite of applications and daemon processes used on *nixmachines primarily for communicating with win* machines for sharingfilespace and printers. Developed by a Pizza Lover, Andrew Tridgell,Samba is based upon SMB (Server Message Block) protocol whichdescribes rules for communication among various machines on a network(for sharing filespace and printers). If you still don't understandwhat SMB protocol is, just launch Network Neighborhood (assuming youwork on windows), and what you see is a live demonstration of SMBprotocol. So, you can call Samba network neighborhood of *nix (Assuch, I prefer it the other way round ;-). Samba's flexibility andfunctionality are unmatched and it's performance has been a matter ofconcern for M$. Apart from sharing filespace and printers, it offerssome more services like.. (I'll be surprised if I have come up with acomplete list ;-)
1. It can act as a Local Browse Master for a Workgroup. Supportsdomain logon and logon scripts. Supports browsing on other subnetsand also supports replication of Browse list across subnetboundaries. (Phew!!)2. It supports a 'Shared User Database' with all the servers in adomain sharing a distributed NIS or kerberos authenticationdatabase.3. It can act as a WINS server.4. It supports SMB password encryption scheme.5. It can be turned into a Fax Server.6. It can take backup of PCs directly to a tape.I come back to the focus point of this article now; sharing filespaceand printers using Samba. Hmmmmm. I think the discussion can bebranched into sharing your filespace and printers with others andsharing others filespace and printers with yours.Sharing your filespace and printers with others:This is accomplished in terms of services (shares in windows). Theconcept is simply that your machine offers services to other machineswhen it lets them read from/write to your drive or when it lets othersprint on your printer. Services are created by configuring/etc/smb.conf (In fact, smb.conf is the backbone of Samba Suite).Samba offers so much flexibility in making the services that it can bereal fun for a creative mind. This is accomplished by the followingcomponents of Samba suite....smbdsmbd is a daemon process that plays key role in providingservices. It listens to the service requests from othermachines and responds as specified in /etc/smb.conf (got theimportance of this file? ;-)nmbdnmbd is a daemon process that understands and replies tonetbios name service requests. Whenever its own name (themachine it's running on) is specified, it responds with the IPaddress of the machine it's running on.smb.conf This is the configuration file for Samba. All daemon processesof Samba suite read this file which makes it extremelyimportant. I advise you to go through man pages and how-tosbefore you sit down to edit this file. If you don't feel likedoing it, I have made an attempt of writing a generic file thatshould satisfy your needs. You can use it but the condition isthat you will have to tell me how bad it is so that others findit a little less bad ;-).testparmOnce smb.conf is edited to meet your requirements, you have tocheck it's validity. Here testparm comes for your rescue!! Itcan point out most of the blunders that your smb.conf is likelyto cause.testprnsThis one points out printing related blunders.Sharing others filespace and printers:This is accomplished by a host of commands...smbclientsmbclient lets you inquire about the services a machine offers.All you have to do is smbclient -L hostname and it lists allthe services of hostname. If you want to browse through aservice, just do smbclient \hostservice. It will give youan ftp like interface.smbmountCall it mapping hostservice on drive U:!! You need to accesssome services quite frequently. smbclient is good for quickbrowsing but not feasible in such a case. So, here comessmbmount. It lets you mount hostservice on a directory justthe way you mount any filesystem. Just do smbmount//host/service /path_to_mount_point and it's done. Access thefiles/printers just as they are attached to your machine!!!smbumountWell, it's obvious!! You may want to unmount the filesystemonce you are through with your job. Just do smbumount/path_to_mount_point and ....nmblookupIt finds the IP Address of a machine given it's netbios name(the name by which a machine appears in Network Neighborhood).LinNeighborhood Just don't forget to pick it up. It's a do-all application witha nice GUI for Samba. A pretty good substitute of the abovefour commands if you find command line a little messy!!"What about Network Neighborhood?", They asked.I smiled and launched LinNeighborhood....Besides these, there are a few other, distribution specific commandswhich I have not described. Please refer to the documentation thatcame with your distro."So, you have Network Neighborhood also on Linux!!", they mumbled.

Samba NT Domain Controller

0 comments

Currently, Samba can go beyond merely emulating Windows shares to actually acting as the Primary Domain Controller for your Windows network. Of course, Samba can also become a NT domain member. In this article we shall look at both these options.
The domain concept is much better than the traditional workgroup concept. One of the primary benefits is having a centralized password database on the Primary Domain Controller. Once authenticated, you can access any of the shares in the domain, without having to re-authenticate yourself.
If you're unfamiliar with Samba, then we've got a couple of good howto's that you can refer to. Look for links to them at the bottom of the article.
Samba as a NT Domain Member
Samba emulates a NT workstation when becoming part of the domain. So, the first thing you need to do is create a machine account for your Samba machine on the domain controller. In NT you would use the program Server Manager for Domains to create the account. Once the account is created, all you need to add are the following lines to your smb.conf file under the global section.
# Your Workgroup or Domain that you want
# to login to
workgroup = FREEOS
# Tell Samba to talk to domain controller
# for authentication
security = domain
# Specify the server to get authenticate
# from. You can specify the
# NetBIOS # names of the servers or simply
# put in a "*" here to let
# Samba find the server through broadcast
password server = PS1 PS2
# Make sure Samba is using encrypted
# passwords
encrypt passwords = yes
Now stop the Samba daemons
/etc/rc.d/init.d/smb stop
Give the following command to join the
NT Domain
smbpasswd -j DOMAIN -r DOMAINPDC
DOMAIN here is the domain that you want to log on to. DOMAINPDC is the primary domain controller for that domain. You will then see a message saying, “Joined domain DOMAIN”.
Now start your SMB and NMB daemons.
/etc/rc.d/init.d/smb start
That was all about joining an NT domain. Setting up Samba as your Primary Domain Controller is not very difficult.
Samba as Primary Domain Controller
Add the following to the global section of your smb.conf file.
# The domain you want to be a PDC for
workgroup = SIMPLE
# Tell Samba to use domain logons
domain logons = yes
# User-level security. Users must
# authenticate themselves with
# valid username and password
security = user
# Set to yes so that nmbd participates
# in local master browser
# elections
local master = yes
# Set Os level value to make sure nmbd
# wins local browse master
# elections. 65 should beat everyone
# according to the man page
os level = 65
# Give nmbd an advantage in local
# master browser elections
preferred master = yes
# Set so that nmbd claims a unique
# NetBIOS name identifying it as
# a domain master
domain master = yes
# The following share is required to support
# domain logons. The directory may be
# created anywhere on your system. Make
# sure the share is non-writeable and also
# not a public share.
[netlogon]
comment = The domain logon service
path = /usr/local/samba/netlogon
public = no
writeable = no
The next thing to do is create the users on the Samba server that is to act as the domain controller. You can do this using the useradd command.
useradd –-g smbuser –-d /dev/null –-s /dev/null ntuser
As you can see, both shell and home directory for ntuser is set to /dev/null. If your Windows users are not required to access the Unix box, you should use the above to deny access to the machine. Passwords are also not required to be set because Samba keeps the password hash in a separate file specified in the configuration file.
# Path to Samba password file
# Make sure only root has read/write access
smb passwd file = /usr/local/samba/smbpasswd
After adding a user (you can also use vipw to add a user), you need to add the user to the samba password database.
“smbpasswd –a” will add all users in Unix passwd file to smbpasswd file. The usage and syntax is similar to the Unix passwd command. To change a users’ password use “smbpasswd username”.
That will be enough for Samba to start authenticating Windows 9X clients. For NT workstations, some more work is to be done. You have to create a machine account for each NT client that will logon. A machine account is simply a regular /etc/passwd entry, with a “$” appended to the name of the NT machine.
useradd –-g smbuser -–d /dev/null -–s /dev/null ntclient$
Now add it to the password database
smbpasswd –a –m ntclient (the $ at the end is not required)
Samba can now accept logons from a NT client.
As you can see, configuring samba as a domain controller and domain member is a fairly easy job. The flip side is that since samba is the result of major amounts of hacking and reverse engineering, it doesn’t have all the functionality of a proper domain controller. There is an alternative branch, Samba TNG that adds more functionality in this area.

Access linux shares from windows

0 comments

The cute-looking Tux had a problem. Everyone thought Tux disliked Windows and therefore wouldn't talk with anything that had 'Win' in it. This thought spread around quite a bit, and therefore most Windows users would have no truck with tux.
But getting Windows to recognise a Linux machine or for that matter getting Linux to recognise Windows-based computers in a network is as simple as configuring your network in Windows.
See-through LinuxWhile Windows uses the popular Network Neighborhood to view other machines, Linux allows other Windows users to view a Linux-PC using a utility called Samba. Samba emulates the Linux machine as a Windows machine and thus allows you to share resources on the hard drive along with the appropriate security roles. Using Samba, it is also possible to share printers or use Windows-based network printers.
However, there are some basic steps that need to be performed before you get your Windows and Linux computers to talk to each other. For example, you need to set the security modes, specify the share names, etc.
Samba for startersBefore starting off the installation and configuration of Samba on a Linux computer, make sure you have the network components set up perfectly. You can find Samba in almost any Linux distribution media. In fact, it is usually installed when you install a Linux distribution. In case the Linux distribution that you have installed or used does not have Samba, you can always download the latest release from the Samba site.
The configuration of Samba doesn't vary from distribution to distribution, so let's see how you can get it right in Red Hat. Before installing any package, you have to be logged in as root. So, type su root at the command prompt or use the X interface to log off from the normal user to root. For installing the packages, Red Hat users can use gnorpm from X. Otherwise, those comfortable with the command line can install Samba using the following command:
rpm -ivh samba-2.i386.rpm
In case your distribution gives you an error that says missing dependencies while installing Samba, install the missing components first or else Samba will not get installed. Once you have successfully installed the Samba daemon on your system, you can move on to configuring it.
Samba sharesFor Windows-based PCs to view your Linux machine, you have to configure Samba. You can either use the graphical interface or manually edit the Samba configuration file. (/etc/samba/smb.conf). Start up your favourite text editor, and open the smb.conf file. There are various sections that you can change depending on your needs, but the most basic is where you just specify the share name, the path and the user rights. Go to the section marked as
[tmp] comment = Temporary file space path = /tmp read only = no public = yes
The [tmp] name denotes the name of the share that will be displayed when anyone tries to access your machine through the Network Neighborhood. The comment tag describes the information about the share [tmp]. The most important line is the one about the path, where you specify the folder which has to be shared. Ensure that the folder has the appropriate security settings to allow others to read or write to it. The read only = no line means that people can also write on the share. The same read only = tag can be made yes to make it only readable by users. The public = yes tag makes the share available for all the public around to see. Similarly, public = no will not allow everyone to access the share; only the particular user will gain access. At the same time, in the security section, change the security to share if you are not using Windows NT domain.
If working with text-based commands is too difficult, then there are graphical interfaces that also allow you to configure Samba. The KDE desktop environment, for instance, has a utility called Ksamba. GnoSamba is a Gnome program for configuring your smb.conf and other Samba files accordingly. This helps in creating and editing Samba shares very efficiently and also easily. There are many other Samba utilities that ease your task and give you more control over the shares.
Maps of the worldAfter you have finished installing and configuring Samba on your Linux distribution, you can go to any machine on your network and see your computer along with the other Windows machines. Like with any other networked computer, you can map the Linux share as a drive. You can access your Linux machine from other *nix systems using smbclient, a Samba client that allows you to connect to a Samba server.
smbclient -L - machine gives you a list of all shares on a particular machine.
smbclient file://testmachine/share allows you to access the shared folder 'share' on a computer called 'testmachine'.
smbmount file://testmachine/share /mnt mounts a share called 'share' from the testmachine computer on a directory called mnt.
If you have smbclient installed on a Windows-based machine, you can use the same commands on that machine too.
Linux in your neighbourhoodTill now, you have seen how your Windows machine can access Linux computers. Even Linux computers can access shares on a Windows PC in an easy way using utilities such as Linneighborhood or XSM Browser. Linneighborhood is a clone of the Windows-based Network Neighborhood and allows users to browse through Windows-based networks. You can mount (map as in Windows) the different Windows shares.
XSMBrowser is another utility for viewing a Windows machine and has an interface similar to that of Netscape Navigator. The installation of XSMBrowser can be done using the Red Hat binaries or by compiling the source.
Lin-Win talkAs you can see, getting Linux and Windows to talk to each other isn't difficult at all. There are other methods also to get Linux connect to Windows clients, but by far what we have outlined here are the simplest methods. And considering the number of graphical utilities that are available for this task, you needn't even bother with any command line parameters. We just had a basic look at sharing files using Samba, but there are many more alternatives such as the Andrew File System (AFS). Better interfaces are the order of the day, and the Windows-Linux network may soon seem an integrated whole.

retrieve recycle bin icon in vista

0 comments

A. A. There are two icons for the Recycle bin, an empty and a full. To change them use the following
Start the registry editor (regedit.exe)
Move to the HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon
To change the empty icon double click on Empty, to change the full icon double click on Full
Set to the icon required, e.g. "d:\Prog Files\Plus\Themes\John.ico,0". The 0 shows it is icon 1 in the file
Exit the registry editor
You can also change the icons using the Plus tab of Display properties.

Nokia 5200 : Review

1 comments



The Nokia 5200 XpressMusic is a lower cost version of the Nokia 5300 XpressMusic. And it shows. The CSTN display is low-grade and the camera is just a VGA. But if you're on a budget, those are lesser issues. It seems like Nokia wanted to make a phone that everybody could afford, and they did so by saving a few bucks on specific components. But the Nokia 5200 also has some very good features.
The Bottom Line: The Nokia 5200 could be a fairly good low-price cell phone, especially given its nice sound and call quality. Most "cons" listed here are bearable but the camera bug is a real turn-off. Unless you absolutely don't need the camera feature, wait until Nokia releases a software fix or updates the next units.
Hardware & Design Quality
Pros:
The keyboard is nice. The keys are large enough and simple to use.
It has a light weight and an adorable small size though it is thicker than many recent small cell phones.Cons:
The back cover is a hassle to remove and you can't insert or remove the memory extension card without popping it out. Since this is a music cell phone, you might actually want to swap your memory extension card quite often. An outside memory card hinge would have been preferable.
The CSTN display doesn't compare to most cell phones today (generally equipped with a TFT). Images are pale and when you type a number, the digits are blurry as they move from right to left. But, hey, Nokia's goal with the 5200 was obviously to offer a very affordable version of its XpressMusic cell phones and that kind of technology choice is part of the cost-lowering equation.
Software
Pros:
Software performance and simplicity are just average. I've seen better. Menu behavior, for instance, is sometimes unbelievably slow.
The Nokia 5200 comes with Windows Live Messenger and Yahoo Instant Messenger. However, the unit I was testing wasn't properly programmed and I was unable to use those features. Cons:
The Nokia 5200 clearly has a camera software bug. It occasionally refuses to take a picture without any specific reason other than the error message "Unable to save," followed by "Camera on standby." That happens intermittently, no matter if the memory is full or empty or if there is a memory card or not. Nokia sent me a second Nokia 5200 in case it was an isolated incident but the same problem happened again. Furthermore, a user on Yahoo Answers claimed to have had this problem. This is an annoying issue and if you plan to use the camera, hold back on buying the Nokia 5200 until Nokia releases a fix. I'm waiting for some news from them regarding this problem.
Menu items can be accessed by numbers but only if you learn the whole sequence for a specific item and type it all out.
Performance
Pros:
The battery life seemed to match the advertised performance.
Call Quality
Pros:

Sound volume was adequate but not excessively high. In noisy area, you might want to use the speakerphone while still sticking the Nokia 5200 to your ear.
The speakerphone was very efficient in cutting out ambient noises and people I talked to didn't complain about the sound quality. Its output volume was above-average but still, some phones offer an even higher speakerphone volume.
Sound quality was above-average and I did not experience any weird signal reception issues.Cons:
A common annoyance with most Nokia phones is that, in order to activate the speakerphone, you must first dial your call and wait a few seconds so that the right soft key shows "loudspeaker" as an option. If you press it too early, the soft-key means "end call" and it cuts the call. That's really unfortunate.
Multimedia Experience
Pros:

The music player is satisfying enough. It includes an Equalizer and a few other tweaking options.
Music sound quality is acceptable, especially the sound generated by the phone's speaker, which is surprisingly good. The provided stereo headset outputs a slightly more muffled sound but was good enough for me.Cons:
The Nokia 5200 has only a VGA (640 x 480 pixels) camera but its image quality was above my expectations (since it's just a VGA). It produced a brighter, sharper image in low light conditions than many higher-end cell phones I tested. Due to the camera's bug, I was unable to take an outside picture.
Liberty Level
The Nokia 5200 has a very good liberty level. It will let you do anything you like, from saving a downloaded midi file as a ringtone to creating your own ringtones with the voice recorder. Bluetooth, infrared or a MicroSD card (not included) will also let you transfer your pictures in and out of the Nokia 5200.

Install and configure Unicode TrueType fonts in Linux

0 comments

Uncompress the downloaded font archive to a directory and add it to the font path, a list of directories containing fonts:
Uncompress the archive# tar xvzf utf8.tar.gzor# tar xvjf arial.tar.bz2
Create a directory for new fonts# mkdir /usr/share/fonts/truetype
Move the uncompressed font files to the new font directory# mv *.ttf /usr/share/fonts/truetype
Navigate to the font directory# cd /usr/share/fonts/truetype
Create fonts.scale and fonts.dir# mkfontscale && mkfontdir# fc-cache
Add the new font directory to the X11 font path# chkfontpath --add /usr/share/fonts/truetype
Restart X font server# /etc/rc.d/init.d/xfs restart
You can verify the successful addition of the new path by running chkfontpath command or by listing X font server's /etc/X11/XF86Config file.
If you do not have root access, copy the *.ttf to ~/.fonts directory instead.
Make X11 fonts available to Java
Perform one of the following:
Open /etc/profile and add a new environment variableJAVA_FONTS=/usr/share/fonts/truetypeexport JAVA_FONTS
Open font.properties file under jre/lib directory, uncommnent and set to the appropriate font directoryappendedfontpath=/usr/share/fonts/truetype

Installing PostScript, OpenType, or TrueType Fonts in Mac OS X

0 comments

Installing PostScript, OpenType, or TrueType Fonts in Mac OS X
Mac OS X supports PostScript Type 1, OpenType, and TrueType font formats.
If you use a font management utility to manage your fonts, follow the instructions for the utility to install and remove fonts.
Note: We recommend installing only one format - OpenType, TrueType, or PostScript - of a font. Installing two or more formats of the same font may cause problems when you try to use view, or print the font.
Installing Fonts into Mac OS X
Before installing fonts, you should close any open applications. For some applications, new fonts do not appear in the font menu if you install them while the application is open.
In the Finder, open the folder or disk that contains the fonts you want to install.
Select the font suitcases for the fonts you want to install. For PostScript Type 1 fonts, also select the printer outline files.
Drag and drop the fonts into the Fonts folder in the Library folder.Note: If you want fonts to be availabe to applications running in Classic mode, you must install fonts in Macintosh TrueType or Macintosh PostScript format into the Fonts folder inside the Classic System Folder.
Installing PostScript or TrueType Fonts in Mac OS 9.x or 8.x
Mac OS 9.x and 8.x support PostScript Type 1 and TrueType font formats.
Macintosh System 9.x allows you to open 512 suitcases at once. Macintosh System 8.x and earlier only allow you to open 128 font suitcases at one time. If you exceed these limits, not all the fonts you install will work.
If you use a font management utility to manage your fonts, follow the instructions for the utility to install and remove fonts.
Note: We recommend installing only one format - TrueType or PostScript - of a font. Installing two or more formats of the same font may cause problems when you try to use view, or print the font. To install PostScript Type 1 fonts, we recommend you use Adobe Type Manager (ATM) Deluxe or ATM Light. You can download ATM Light for free from Adobe's Web site.
Installing Fonts into Mac OS 9.x or 8.x
Before installing fonts, you should close any open applications. For some applications, new fonts do not appear in the font menu if you install them while the application is open.
In the Finder, open the folder or disk that contains the fonts you want to install.
Select the font suitcases for the fonts you want to install. For PostScript Type 1 fonts, also select the printer outline files.
Drag and drop the fonts onto the closed System Folder icon.
Click OK to install the fonts.

Anatomy of the Linux kernel

0 comments

The Linux® kernel is the core of a large and complex operating system, and while it's huge, it is well organized in terms of subsystems and layers. In this article, you explore the general structure of the Linux kernel and get to know its major subsystems and core interfaces. Where possible, you get links to other IBM articles to help you dig deeper.
capture_referrer();


Show more developerWorks content related to my search


-->
Given that the goal of this article is to introduce you to the Linux kernel and explore its architecture and major components, let's start with a short tour of Linux kernel history, then look at the Linux kernel architecture from 30,000 feet, and, finally, examine its major subsystems. The Linux kernel is over six million lines of code, so this introduction is not exhaustive. Use the pointers to more content to dig in further.
A short tour of Linux history
Linux or GNU/Linux?




You've probably noticed that Linux as an operating system is referred to in some cases as "Linux" and in others as "GNU/Linux." The reason behind this is that Linux is the kernel of an operating system. The wide range of applications that make the operating system useful are the GNU software. For example, the windowing system, compiler, variety of shells, development tools, editors, utilities, and other applications exist outside of the kernel, many of which are GNU software. For this reason, many consider "GNU/Linux" a more appropriate name for the operating system, while "Linux" is appropriate when referring to just the kernel.
While Linux is arguably the most popular open source operating system, its history is actually quite short considering the timeline of operating systems. In the early days of computing, programmers developed on the bare hardware in the hardware's language. The lack of an operating system meant that only one application (and one user) could use the large and expensive device at a time. Early operating systems were developed in the 1950s to provide a simpler development experience. Examples include the General Motors Operating System (GMOS) developed for the IBM 701 and the FORTRAN Monitor System (FMS) developed by North American Aviation for the IBM 709.
In the 1960s, Massachusetts Institute of Technology (MIT) and a host of companies developed an experimental operating system called Multics (or Multiplexed Information and Computing Service) for the GE-645. One of the developers of this operating system, AT&T, dropped out of Multics and developed their own operating system in 1970 called Unics. Along with this operating system was the C language, for which C was developed and then rewritten to make operating system development portable.
Twenty years later, Andrew Tanenbaum created a microkernel version of UNIX®, called MINIX (for minimal UNIX), that ran on small personal computers. This open source operating system inspired Linus Torvalds' initial development of Linux in the early 1990s.



Linux quickly evolved from a single-person project to a world-wide development project involving thousands of developers. One of the most important decisions for Linux was its adoption of the GNU General Public License (GPL). Under the GPL, the Linux kernel was protected from commercial exploitation, and it also benefited from the user-space development of the GNU project (of Richard Stallman, whose source dwarfs that of the Linux kernel). This allowed useful applications such as the GNU Compiler Collection (GCC) and various shell support.






Introduction to the Linux kernel
Now on to a high-altitude look at the GNU/Linux operating system architecture. You can think about an operating system from two levels, as shown in Figure 2.Figure 2. The fundamental architecture of the GNU/Linux operating system




At the top is the user, or application, space. This is where the user applications are executed. Below the user space is the kernel space. Here, the Linux kernel exists.
There is also the GNU C Library (glibc). This provides the system call interface that connects to the kernel and provides the mechanism to transition between the user-space application and the kernel. This is important because the kernel and user application occupy different protected address spaces. And while each user-space process occupies its own virtual address space, the kernel occupies a single address space. For more information, see the links in the Resources section.
The Linux kernel can be further divided into three gross levels. At the top is the system call interface, which implements the basic functions such as read and write. Below the system call interface is the kernel code, which can be more accurately defined as the architecture-independent kernel code. This code is common to all of the processor architectures supported by Linux. Below this is the architecture-dependent code, which forms what is more commonly called a BSP (Board Support Package). This code serves as the processor and platform-specific code for the given architecture.


Properties of the Linux kernel
When discussing architecture of a large and complex system, you can view the system from many perspectives. One goal of an architectural decomposition is to provide a way to better understand the source, and that's what we'll do here.
The Linux kernel implements a number of important architectural attributes. At a high level, and at lower levels, the kernel is layered into a number of distinct subsystems. Linux can also be considered monolithic because it lumps all of the basic services into the kernel. This differs from a microkernel architecture where the kernel provides basic services such as communication, I/O, and memory and process management, and more specific services are plugged in to the microkernel layer. Each has its own advantages, but I'll steer clear of that debate.
Over time, the Linux kernel has become efficient in terms of both memory and CPU usage, as well as extremely stable. But the most interesting aspect of Linux, given its size and complexity, is its portability. Linux can be compiled to run on a huge number of processors and platforms with different architectural constraints and needs. One example is the ability for Linux to run on a process with a memory management unit (MMU), as well as those that provide no MMU. The uClinux port of the Linux kernel provides for non-MMU support. See the Resources section for more details.

Major subsystems of the Linux kernel
Now let's look at some of the major components of the Linux kernel using the breakdown shown in Figure 3 as a guide.Figure 3. One architectural perspective of the Linux kernel


System call interface
The SCI is a thin layer that provides the means to perform function calls from user space into the kernel. As discussed previously, this interface can be architecture dependent, even within the same processor family. The SCI is actually an interesting function-call multiplexing and demultiplexing service. You can find the SCI implementation in ./linux/kernel, as well as architecture-dependent portions in ./linux/arch. More details for this component are available in the Resources section.
Process management
What is a kernel?As shown in Figure 3, a kernel is really nothing more than a resource manager. Whether the resource being managed is a process, memory, or hardware device, the kernel manages and arbitrates access to the resource between multiple competing users (both in the kernel and in user space).
Process management is focused on the execution of processes. In the kernel, these are called threads and represent an individual virtualization of the processor (thread code, data, stack, and CPU registers). In user space, the term process is typically used, though the Linux implementation does not separate the two concepts (processes and threads). The kernel provides an application program interface (API) through the SCI to create a new process (fork, exec, or Portable Operating System Interface [POSIX] functions), stop a process (kill, exit), and communicate and synchronize between them (signal, or POSIX mechanisms).
Also in process management is the need to share the CPU between the active threads. The kernel implements a novel scheduling algorithm that operates in constant time, regardless of the number of threads vying for the CPU. This is called the O(1) scheduler, denoting that the same amount of time is taken to schedule one thread as it is to schedule many. The O(1) scheduler also supports multiple processors (called Symmetric MultiProcessing, or SMP). You can find the process management sources in ./linux/kernel and architecture-dependent sources in ./linux/arch). You can learn more about this algorithm in the Resources section.
Memory management
Another important resource that's managed by the kernel is memory. For efficiency, given the way that the hardware manages virtual memory, memory is managed in what are called pages (4KB in size for most architectures). Linux includes the means to manage the available memory, as well as the hardware mechanisms for physical and virtual mappings.
But memory management is much more than managing 4KB buffers. Linux provides abstractions over 4KB buffers, such as the slab allocator. This memory management scheme uses 4KB buffers as its base, but then allocates structures from within, keeping track of which pages are full, partially used, and empty. This allows the scheme to dynamically grow and shrink based on the needs of the greater system.
Supporting multiple users of memory, there are times when the available memory can be exhausted. For this reason, pages can be moved out of memory and onto the disk. This process is called swapping because the pages are swapped from memory onto the hard disk. You can find the memory management sources in ./linux/mm.
Virtual file system
The virtual file system (VFS) is an interesting aspect of the Linux kernel because it provides a common interface abstraction for file systems. The VFS provides a switching layer between the SCI and the file systems supported by the kernel (see Figure 4).Figure 4. The VFS provides a switching fabric between users and file systems
At the top of the VFS is a common API abstraction of functions such as open, close, read, and write. At the bottom of the VFS are the file system abstractions that define how the upper-layer functions are implemented. These are plug-ins for the given file system (of which over 50 exist). You can find the file system sources in ./linux/fs.
Below the file system layer is the buffer cache, which provides a common set of functions to the file system layer (independent of any particular file system). This caching layer optimizes access to the physical devices by keeping data around for a short time (or speculatively read ahead so that the data is available when needed). Below the buffer cache are the device drivers, which implement the interface for the particular physical device.
Network stack
The network stack, by design, follows a layered architecture modeled after the protocols themselves. Recall that the Internet Protocol (IP) is the core network layer protocol that sits below the transport protocol (most commonly the Transmission Control Protocol, or TCP). Above TCP is the sockets layer, which is invoked through the SCI.
The sockets layer is the standard API to the networking subsystem and provides a user interface to a variety of networking protocols. From raw frame access to IP protocol data units (PDUs) and up to TCP and the User Datagram Protocol (UDP), the sockets layer provides a standardized way to manage connections and move data between endpoints. You can find the networking sources in the kernel at ./linux/net.
Device drivers
The vast majority of the source code in the Linux kernel exists in device drivers that make a particular hardware device usable. The Linux source tree provides a drivers subdirectory that is further divided by the various devices that are supported, such as Bluetooth, I2C, serial, and so on. You can find the device driver sources in ./linux/drivers.
Architecture-dependent code
While much of Linux is independent of the architecture on which it runs, there are elements that must consider the architecture for normal operation and for efficiency. The ./linux/arch subdirectory defines the architecture-dependent portion of the kernel source contained in a number of subdirectories that are specific to the architecture (collectively forming the BSP). For a typical desktop, the i386 directory is used. Each architecture subdirectory contains a number of other subdirectories that focus on a particular aspect of the kernel, such as boot, kernel, memory management, and others. You can find the architecture-dependent code in ./linux/arch.
Back to top
Interesting features of the Linux kernel
If the portability and efficiency of the Linux kernel weren't enough, it provides some other features that could not be classified in the previous decomposition.
Linux, being a production operating system and open source, is a great test bed for new protocols and advancements of those protocols. Linux supports a large number of networking protocols, including the typical TCP/IP, and also extension for high-speed networking (greater than 1 Gigabit Ethernet [GbE] and 10 GbE). Linux also supports protocols such as the Stream Control Transmission Protocol (SCTP), which provides many advanced features above TCP (as a replacement transport level protocol).
Linux is also a dynamic kernel, supporting the addition and removal of software components on the fly. These are called dynamically loadable kernel modules, and they can be inserted at boot when they're needed (when a particular device is found requiring the module) or at any time by the user.
A recent advancement of Linux is its use as an operating system for other operating systems (called a hypervisor). Recently, a modification to the kernel was made called the Kernel-based Virtual Machine (KVM). This modification enabled a new interface to user space that allows other operating systems to run above the KVM-enabled kernel. In addition to running another instance of Linux, Microsoft® Windows® can also be virtualized. The only constraint is that the underlying processor must support the new virtualization instructions. See the Resources section for more information.

What is the difference between public and private IP

0 comments

What is the difference between public and private IP?
A public IP address makes your equipment accessible to everyone on the internet and is needed for VoIP or if you want to give others to access to specific equipment on your network. You must therefore be careful to protect your equipment from hackers and viruses and not to allow your equipment to be hi-jacked and used as an open email-relay, for example. A private IP address is for private use within the network and allows many more PCs to be connected. If a customer is using a private IP and later wants VOIP they would need to change to a public IP address. How many IP addresses can I use?Link-Sat provides a set of 8 IP addresses at the time of site activation. Here is the example of how these IP addresses are used: 1st IP is for network assignment (cannot be used)2nd IP is for RCST IP Gateway3rd, 4th, 5th, 6th and 7th for your router, PCs etc.8th one is for broadcast (cannot be used)A subnet mask and two DNS IP addresses are also provided for connected PCs.

Public ip are the ip that can be accessed by every one,ie very user has the access to this ip's.e.g yahoo.com,google.com etc are the pubic ip's.
Private ip's are the ip that can not be accessed by every one,ie they are execively owned by an organization,only the user of that organisation has the access to this ip's.
Range of private IP address are
class A 10.0.0.1 to 10.255.255.254
class B 172.16.0.1 to 172.31.255.254
class C 192.168.0.0 - 192.168.255.255 (CIDR: 192.168/16)
excluding ips are public ip's.


Private IP address - It is used to hide systems from public internet.
Class A - 10.0.0.0 to 10.255.255.255
Class B - 172.16.0.0. to 172.31.255.255
Class C - 192.168.0.0 to 192.168.255.255
Automatic Private IP Address
169.254.0.0 - 169.254.255.255