Pages

Unixbhaskar's Blog

Saturday, September 18, 2010

SASL : IMAP authentication system

In this article I am going to take you through cyrus-sasl to built with postfix mail server.So fasten your seat belt for the ride.

SASL stand for Simple Authentication Security Layer and I will integrate it with an IMAP server built with postfix.SASL is defined in RFC-2222.SASL is a means for authenticating yourself to the server without providing your password in the clear. This can also be used to provide extended capabilities based on your authorization. In plainer words, a SASL mechanism can provide authentication only, or it can also provide integrity checking, and possibly encryption as well.

I do not issue any guarantee that this will work for you.

First and foremost thing to get the cyrus-sasl source from here or go to the website dedicated to it.

Ok, I am building it on Gentoo,so I will furnish the steps required to get it work on it.But the prime focus would be to show you how it work.

bhaskar@bhaskar-laptop_08:22:37_Sat Sep 18:~> sudo emerge -av cyrus-sasl
Password:

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] dev-libs/cyrus-sasl-2.1.23-r1 USE="berkdb crypt gdbm ldap pam ssl -authdaemond -java -kerberos -mysql -ntlm_unsupported_patch -postgres -sample -sqlite -srp -urandom" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No]


I choose N or no here because I have it already in the system.But when did I have it into the system? lets find out:

bhaskar@bhaskar-laptop_08:47:55_Sat Sep 18:~> sudo genlop -t cyrus-sasl
* dev-libs/cyrus-sasl

Fri Nov 13 18:08:00 2009 >>> dev-libs/cyrus-sasl-2.1.23-r1
merge time: 2 minutes and 5 seconds.


Right! now move on. We need to add an user to operate to manage that software.So here we go:

bhaskar@bhaskar-laptop_08:49:18_Sat Sep 18:~> sudo useradd -g mail cyrus

Now you see the user like this:

bhaskar@bhaskar-laptop_08:49:18_Sat Sep 18:~> id cyrus
uid=110(cyrus) gid=12(mail) groups=12(mail)


Next we change the password of it ,the user cyrus created in the previous steps, like this:

root@bhaskar-laptop_09:02:10_Sat Sep 18:/home/bhaskar # passwd cyrus
Password:
Retype new password:
passwd: password updated successfully


Cool! You can go ahead and test the user before you start to implement other thing with it.So now little bit of placeholders need to created for it.

Creating the necessary directories

This list of instructions will set up all the directories necessary for imap.

1. mkdir /var/adm

2. touch /var/adm/imapd.log /var/adm/auth.log

3. mkdir /var/imap /var/spool/imap /var/imap/srvtab

4. chown cyrus /var/imap /var/spool/imap /var/imap/srvtab

5. chgrp mail /var/imap /var/spool/imap /var/imap/srvtab

6. chmod 750 /var/imap /var/spool/imap /var/imap/srvtab


Pretty easily understandable those commands ,if not please cut and paste it your system to see the effect of it.

Now lets working as user cyrus created earlier..so the chances will be less to intermingle with other thing:

root@bhaskar-laptop_09:12:35_Sat Sep 18:/home/bhaskar # su cyrus

cyrus@bhaskar-laptop_09:12:39_Sat Sep 18:/home/bhaskar>


Now we are going to put some entry into the syslog config file so the logger will take action on it.

bhaskar@bhaskar-laptop_09:18:02_Sat Sep 18:/etc/syslog-ng> sudo vim syslog-ng.conf


and we put into it below lines:

local6.debug /var/adm/imapd.log
auth.debug /var/adm/auth.log


Ok,one more thing to do before I jump into the cyrus thing. We need to edit the file called /etc/imapd.conf,because we are integrating with an imap server.

bhaskar@bhaskar-laptop_09:22:38_Sat Sep 18:~> sudo vim /etc/imapd.conf

Once you are inside the file please add those below line and save the file:

configdirectory: /var/imap
6 partition-default: /var/spool/imap
7 sievedir: /var/imap/sieve
8
9 tls_ca_path: /etc/ssl/certs
10 tls_cert_file: /etc/ssl/cyrus/server.crt
11 tls_key_file: /etc/ssl/cyrus/server.key
12
13 # Don't use an everyday user as admin.
14 admins: cyrus
15
16 hashimapspool: yes
17 allowanonymouslogin: no
18 allowplaintext: no




So these are entry I have put in.As I have ssl cert too!.I have use the sasldb to check my password and the entry look in the file is :

# Use saslauthd if you want to use pam for imap.
27 # But be warned: login with DIGEST-MD5 or CRAM-MD5
28 # is not possible using pam.
29 sasl_pwcheck_method: saslauthd

Now we need to check the services file which reside in /etc directory to hold the information about the system services.We need to look into that file for some specific lines mentioned below:

pop3 110/tcp
imap 143/tcp
imsp 406/tcp
kpop 1109/tcp
sieve 2000/tcp

POP3:

root@bhaskar-laptop_09:36:28_Sat Sep 18:/var/spool # grep pop3 /etc/services
pop3 110/tcp pop-3 # Post Office Protocol - Version 3
pop3 110/udp pop-3
pop3s 995/tcp # pop3 protocol over TLS/SSL
pop3s 995/udp


IMAP:

root@bhaskar-laptop_09:37:15_Sat Sep 18:/var/spool # grep imap /etc/services
imap 143/tcp imap2 # Internet Message Access Protocol
imap 143/udp imap2
imap3 220/tcp # Interactive Mail Access
imap3 220/udp
imaps 993/tcp # imap4 protocol over TLS/SSL
imaps 993/udp

IMSP:

root@bhaskar-laptop_09:37:22_Sat Sep 18:/var/spool # grep imsp /etc/services
imsp 406/tcp # Interactive Mail Support Protocol
imsp 406/udp

KPOP;

root@bhaskar-laptop_09:38:29_Sat Sep 18:/var/spool # grep kpop /etc/services
kpop 1109/tcp # Pop with Kerberos

SIEVE:

root@bhaskar-laptop_09:39:09_Sat Sep 18:/var/spool # grep sieve /etc/services
cisco-sccp 2000/tcp sieve # Cisco SCCP
cisco-sccp 2000/udp sieve


So things are in place.Cool! looks good indeed.Now we need to modify the superserver file called inetd or in modern system called xinetd.



imap stream tcp nowait cyrus /usr/cyrus/bin/imapd imapd
pop3 stream tcp nowait cyrus /usr/cyrus/bin/pop3d pop3d



As I said before that we are going to be integrated with postifx,so need to check out this thing in /etc/postfix/master.cf for the user cyrus :

root@bhaskar-laptop_09:58:51_Sat Sep 18:/etc # grep cyrus /etc/postfix/master.cf
cyrus unix - n n - - pipe
# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#cyrus unix - n n - - pipe
# user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}


So in my system it in place but if you don't have this thing set please do that.

Now we need to add the cyrus administrator for the monitoring and administrative works.Here is the steps:

root@bhaskar-laptop_10:12:00_Sat Sep 18:/etc # /usr/sbin/saslpasswd2 cyrus
Password:
Again (for verification):


Now it's time for the testing the server with authentication...so here we go:

cyrus@bhaskar-laptop_10:46:00_Sat Sep 18:/root> cyradm --auth login localhost
verify error:num=18:self signed certificate
IMAP Password:

bhaskar-laptop.localdomain> ?
authenticate, login, auth authenticate to server
chdir, cd change current directory
createmailbox, create, cm create mailbox
deleteaclmailbox, deleteacl, dam remove ACLs from mailbox
deletemailbox, delete, dm delete mailbox
disconnect, disc disconnect from current server
exit, quit exit cyradm
help, ? show commands
info display mailbox/server metadata
listacl, lam, listaclmailbox list ACLs on mailbox
listmailbox, lm list mailboxes
listquota, lq list quotas on specified root
listquotaroot, lqr, lqm show quota roots and quotas for mailbox
mboxcfg, mboxconfig configure mailbox
reconstruct reconstruct mailbox (if supported)
renamemailbox, rename, renm rename (and optionally relocate) mailbox
server, servername, connect show current server or connect to server
setaclmailbox, sam, setacl set ACLs on mailbox
setinfo set server metadata
setquota, sq set quota on mailbox or resource
subscribe, sub subscribe to a mailbox
unsubscribe, unsub unsubscribe from a mailbox
version, ver display version info of current server
xfermailbox, xfer transfer (relocate) a mailbox to a different server


Creating mailbox for the specified user

bhaskar-laptop.localdomain> cm user.bhaskar
bhaskar-laptop.localdomain> lm
user.bhaskar (\HasNoChildren)

Here "lm" stands for list mailbox, which is available by the help command shown above.

Now you can do so many thing with the mail server namely create a user,set quota for their mails box to name a few.Please look at the command enlisted above to utilise it.

Hope this will help.

Cheers!
Bhaskar

Monday, September 13, 2010

LDAP: The tool to manage enterprise infrastructure

I am provoked or compelled or whatever you say to write this article about this topic and the article that spurs the interest is here and many more on the internet by some brilliant guys and that's reminds me of dealing with LDAP with one of my job assignment.Without doubt I must say it is a complex topic to deal with( at least my bend of mind says so.. YMMV).But having said that it is an absolute must for any administrator handling large network infrastructure in the corporation should be very well aware of this protocol as well the usability of it.

I do not issue any guarantee that this will work for you.

I am assuming that readers are aware of this protocol, if not then please look in OpenLDAP Website to get an idea of it.OpenLDAP is an open source suite of software that includes the LDAP server daemon (slapd), a replication daemon (slurpd) and a small collection of command line client tools, like ldapsearch and ldapadd, among others. In this article, we'll set up and populate a small but functional LDAP server using the slapd daemon, and start to make use of it with a Linux client.


Definition and Components

LDAP stands for Lightweight Directory Access Protocol, which is to say that, by definition, LDAP is a protocol, and nothing else. However, the protocol exists to perform operations on data, and is really pretty useless without it. This brings up the components that make up an LDAP deployment: client software used to send LDAP requests, the server daemon that handles incoming LDAP requests, and the back-end data store. I will refer to the last two collectively as a "directory service."

Back-end Data Storage

Of these components, the back-end data storage mechanism is the least relevant to you unless you're administering a production LDAP deployment. Developers writing code that accesses an LDAP server and end users who access a directory service via some client utility should be happy to let the protocol do the job of getting data to them without knowing anything about the back end. Adding, removing, updating, deleting, and fetching data from a directory service occurs through the LDAP protocol.

Now there are few variant of the LDAP thing like :

a)OpenLDAP

b) FDS(Fedora Directory Server)

c) Novell's eDirectory

d)Sun Java System Directory or formarly iPlanet

So we will sticks with OpenLDAP in this article to investigate with.

What Is LDAP Used For?

An LDAP directory service stores information for use by systems as well as end users (and their various applications). Probably the most common use of LDAP is for replacing either flat-file authentication (think /etc/passwd) or legacy networked authentication (think NIS). The benefit of any networked authentication mechanism over a flat file system is clearly that it lifts the burden of having to keep files on all of your systems in sync. The benefit of LDAP over, say, NIS is (among other things) a finer-grained control over the data and how it is accessed (and by whom). You can also make encrypted connections to LDAP servers using TLS or SSL, and you never have to muck with flat file "maps" or complicated Makefiles to change the data.

Because LDAP is a transaction-based system, operations that complete successfully are immediately "live." Modern Unix-based systems (including Linux, BSD, and OS X) can rely on LDAP to get just about any information they could store in flat files or NIS, including hosts, automounter configuration, users, groups, and more. Add to that the ability to have Samba, Apache, PAM, tcpwrappers, Sendmail, and other applications talk to LDAP for authentication, aliases, and other tidbits of useful information, and you have the beginnings of a very well-integrated, easily maintained, authoritative data source for your entire infrastructure.

LDAP is also popular for use as a "white pages" directory for a department or corporation. For example, most email applications, from Mutt and Pine to Outlook, Evolution, and KMail all know how to talk to an LDAP server. This makes it very easy to, for example, tell KMail to autocomplete addresses as you type using an LDAP directory as its addressbook source instead of (or in addition to) local files.To add to the list Thunderbird too will support that protocol.

A Closer Look at LDAP Data

It's extremely important when learning about LDAP and how it deals with data to separate the structure (or topology) of the data from the definitions of the objects themselves.

Simply, the structure of LDAP data is a hierarchical collection of objects. Objects can represent anything from people to printers and take their places within the hierarchy using whatever logic you like.

Objects?

Yes, objects. Each object has a list of attributes associated with it that describe that particular object. When you add or delete an object, make a request for an object, or change the value of an object's attribute, you do so solely using the LDAP protocol. In short, LDAP exists to manipulate or fetch data about objects.

Hierarchical?

The layout of the data in an LDAP directory is the Directory Information Tree (DIT). You can customize it to the needs of your organization, but it's still a hierarchical tree structure. This tree is not dissimilar to a typical filesystem; there's a "top" or "root" directory, under which are high-level objects (directories in a filesystem). Those help you to categorize the lower level objects that you're really interested in (in a filesystem, these are the files themselves).

Suppose you want to store information about people using a hierarchical collection of objects. Viewing things as a filesystem, you could create a /People directory, and under that, create a file--/People/whatEverYouWant. That file contains attribute name and value pairs to describe "steve." One attribute might be "firstname," with a value of "Dan." Save the file, and create a new one for each person. Eventually, you have a filesystem that looks something like:

/people
Steve
Dan
Bhaskar

We might create it like department wise like this:

/people
/Engineering
Bhaskar
Dan
Jones
/Finance
Marry
Garth

LDAP data are represented in the LDIF(LDAP Data Interchange Format).

What Are Objectclasses?

Objectclasses are prototypes for entries that will actually exist in your directory server. The objectclass definition (which uses ASN.1 syntax) specifies which attributes may or must be used by LDAP entries declared as instances of a particular objectclass.

Get it? Let me explain it backward, in the way that most people get into LDAP: you want to store information about people. The most common attributes associated with people are:

* First name
* Last name
* Email address
* Phone numbers
* Room numbers

These attributes are great for setting up an office whitepages server that users can refer to for information about people in their office. The key now is finding out which objectclass definitions either require or allow for the use of these attributes. When I started with LDAP, I researched this by perusing the actual schema files that come with most (if not all) directory servers. These files are human-readable.

Object Class Definitions

Here's the definition of the inetOrgPerson objectclass, which is a good place to start:

objectclass ( 2.16.840.1.113730.3.2.2
NAME 'inetOrgPerson'
DESC 'RFC2798: Internet Organizational Person'
SUP organizationalPerson
STRUCTURAL
MAY (
audio $ businessCategory $ carLicense $ departmentNumber $
displayName $ employeeNumber $ employeeType $ givenName $
homePhone $ homePostalAddress $ initials $ jpegPhoto $
labeledURI $ mail $ manager $ mobile $ o $ pager $
photo $ roomNumber $ secretary $ uid $ userCertificate $
x500uniqueIdentifier $ preferredLanguage $
userSMIMECertificate $ userPKCS12 )



The first line states that what follows is an objectclass definition, as opposed to an attributetype definition. The long number is the ASN.1 number assigned to the objectclass. If you create your own objectclasses, this number is significant; it's where you use your organization's IANA Enterprise Number to identify any objectclasses that you create.

The NAME line should be self explanatory. It is the name that will appear in your users' entries to state that the user is of type inetOrgPerson. This line gives you license to use any of the attributes in the objectclass definition to describe the user.

The DESC line is usually a useful description that can help you use this object in a way appropriate to the intent of the definer. You don't want to use objectclasses in a completely unorthodox way, because when you reach out to others for help, they'll find themselves asking you more questions than you ask them, which is often a sign that you've gone off in the wrong direction.

The SUP line is critical, and the theory is tough to describe without getting pretty verbose. SUP is short for SUPERIOR, and it names another objectclass from which this objectclass inherits. In this case, the superior or parent objectclass is organizationalPerson. The organizationalPerson class inherits from the person objectclass, which inherits from an objectclass called top. If an objectclass has no other superiors, it is always a child of the top objectclass.

It's an inheritance chain. You need to understand it, because some LDAP servers strictly enforce it, and if you violate it in the creation of your entries, the directory server will unceremoniously spit them back at you.

The MAY line is actually a block. That block (between parentheses) contains a list, delimited with the $ symbol, of all of the attributes that MAY be used to describe an object declared of the type inetOrgPerson.

OK enough internals..lets go ahead and install and deploy the thing.For more curious reader I will provide you the link from where this article is influenced in resource section in the end.

Installing OpenLDAP:

You can download OpenLDAP from the OpenLDAP website. While it is certainly possible to obtain precompiled binary distributions of OpenLDAP in RPM, deb, and other package formats, these tend to be somewhat older releases. There are many useful customizations you can make during an OpenLDAP compile, and I've never had much trouble compiling OpenLDAP from source, so this is the method I'm advocating.

This is not to say that there are absolutely no dependencies to satisfy. There are two major dependencies, both of which are very easy to handle:

Berkeley DB

The OpenLDAP team strongly recommends using Sleepycat Software's Berkeley DB as the data storage mechanism for an OpenLDAP deployment. As we mentioned in Part One of the series, LDAP is not a database, but a protocol for accessing and managing data. But the data has to live somewhere, and Berkeley DB is easy to deal with, even for newbie admins. If you're among those who have nightmares about databases, take heart in knowing that OpenLDAP does a superb job at hiding the fact that you're even dealing with one. Download the Berkeley DB source from the user-friendly Sleepycat download page. For my test build, I used Berkeley DB 4.1.25 without strong encryption support.

Building Berkeley DB couldn't be easier. Unpack the tarball, cd to the build_unix directory, and type ../dist/configure, followed by make and make install (the last as root). This will create a directory called /usr/local/BerkeleyDB.4.1, which contains all of the pertinent parts we need for our OpenLDAP installation.

OpenSSL for LDAPS

If you're using Redhat, Fedora,Gentoo,Arch,Debian or any number of other recent distributions, OpenSSL is probably already installed. If it isn't, and you wish to enable secure connections to your LDAP server, you need to install it. Luckily, this is a breeze. Grab a source tarball from the OpenSSL Download Page. Untar it, cd to the resulting directory, and run the standard configure and make commands. I also recommend that you run make test, and then (as root, of course) make install. This puts everything you need in the /usr/local/ssl directory by default.


Anyway I have created a user and group which will be able to operate the ldap thing going.Here is that:

bhaskar@bhaskar-laptop_14:51:17_Mon Sep 13:~> id ldap
uid=439(ldap) gid=439(ldap) groups=439(ldap)


Now we need to investigate the slapd.conf file,this is the file which drive ldap.So here we go:

Here's a quick and dirty slapd.conf that gets the daemon up and running and allows an administrative user to manipulate data:

include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema


Schema files define objects and attributes. When the slapd daemon starts, it includes whichever schema files we tell it to here, and that determines the types of objects and attributes supported by that slapd daemon. So, for example, if we did not include the nis.schema file, we would not be able to add typical Unix accounts using only the other schema files we've included. Schema files are human-readable, and you could even create your own schema files if you needed some wacky object-types that aren't already defined.

allow bind_v2
pidfile /var/run/slapd.pid


In newer versions of OpenLDAP, only LDAPv3 binds are allowed by default, which has caused many a mailing list crisis, since there are applications that don't support making a version 3 bind to a directory server. In the event we come across any in our travels, we've allowed LDAPv2 binds for our proof-of-concept, as you can see here:

database bdb
suffix "dc=bhaskar-laptop,dc=localdomain"
rootdn "cn=Manager,dc=bhaskar-laptop,dc=localdomain"
rootpw secret ------------> which is generated by slappasswd previously,just cut and paste
directory /var/lib/ldap

Our database backend is the Berkeley database, which OpenLDAP knows as "bdb." The slapd.conf man page can tell you other possible values for the database directive. Our suffix uses what's known as the "domain component" model. This model just takes the parts of a domain and references each part of the domain name as a separate domain component (dc). We'll talk more about this in a future article.

The rootdn and rootpw values define the administrative username and password for performing on the directory or its data operations that require administrative priveleges. The username is defined using a common name (cn), and the object entry for that user is stored directly under our top-level entry -- hence the trailing domain components. The password is generated using the slappasswd command, which simply prompts you for a password and generates output which can be cut and pasted into the slapd.conf file, as I've done here.

directory tells the slapd daemon where to store the data files for this particular database definition. There can be several database sections in a slapd.conf file. Here, we're telling slapd to use its home directory as its data storage directory, which is why the ldap user must be able to write there.

index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub


Defining indexes at this early stage won't make a great amount of difference. However, as the directory grows and more demands are placed upon it, indexes can mean the difference between users who don't notice that things that used to be handle by, say, NIS are now handled by something else, and a completely unusable directory server.

Now all boil down to starting the ldap daemon that slapd like below:

/etc/init.d/slapd start------------------> Every others else

or

/etc/rc.d/slapd start ------------> Gentoo ,Arch and variant

or

service slapd start ------------> Fedora and Redhat variant


Still it depend on the OS you sit on..but the intention would be same..

Resources:

a)LDAP

b)LDAP-data

c)OpenLDAP Install

d)OpenLDAP Install -II

e)OpenLdap Administration

Hope this will help.

Cheers!
Bhaskar

Thursday, September 2, 2010

Important system tools- part-II

This is a second article related to this(system tools) information .You can find the first part here . Ok GNU/Linux come with so many wonderful tools that one entire book will not suffice to write about it.As it visible everywhere.

I do not issue any guarantee that this will work for you.

I am going to take you through some tricky tools GNU/Linux provide to deal with oddity or complexity.Important to understand administrators love these kind tools under thier armory to shoot out problem as precisely as possible ,so they can concentrate on other equally important matters at hand.Time management is one of the key to become a efficent administrator at production environment.

So here we go.

Dmidecode:

A bit of explanation about it first. This tool will reveal the BIOS information of the system .So it's a handy way to know about it without rebooting the system.Most of the distros these days have it in thier respective repositories.

bhaskar@bhaskar-laptop_05:29:31_Thu Sep 02:~> sudo /usr/sbin/dmidecode
# dmidecode 2.10
SMBIOS 2.4 present.
25 structures occupying 1236 bytes.
Table at 0x000F25D2.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor: Hewlett-Packard
Version: 68MSU Ver. F.03
Release Date: 08/15/2007
Address: 0xE0000
Runtime Size: 128 kB
ROM Size: 1024 kB
Characteristics:
PCI is supported
PC Card (PCMCIA) is supported
PNP is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
EDD is supported
3.5"/720 kB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
ACPI is supported
USB legacy is supported
LS-120 boot is supported
Smart battery is supported
BIOS boot specification is supported
Function key-initiated network boot is supported
Targeted content distribution is supported
BIOS Revision: 15.3
Firmware Revision: 132.14

Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: Hewlett-Packard
Product Name: Compaq Presario B1200
Version: F.03
Serial Number: CNU8011ZJZ
UUID: 24FEFA40-3A15-E011-3F84-6D9910097D29
Wake-up Type: Power Switch
SKU Number: GP279PA#ACJ
Family: 103C_5335KV

Handle 0x0040, DMI type 126, 42 bytes
Inactive

Handle 0x0002, DMI type 2, 8 bytes
Base Board Information
Manufacturer: Hewlett-Packard
Product Name: 0AC0
Version: KBC Version 84.0E
Serial Number: Not Specified

Handle 0x0003, DMI type 3, 13 bytes
Chassis Information
Manufacturer: Hewlett-Packard
Type: Notebook
Lock: Not Present
Version: Not Specified
Serial Number: CNU8011ZJZ
Asset Tag: CNU8011ZJZ
Boot-up State: Safe
Power Supply State: Safe
Thermal State: Safe
Security Status: External Interface Enabled

Handle 0x0041, DMI type 126, 32 bytes
Inactive

Handle 0x0004, DMI type 4, 35 bytes
Processor Information
Socket Designation: U10
Type: Central Processor
Family: Pentium M
Manufacturer: Intel(R)
ID: FD 06 00 00 FF FB EB BF
Signature: Type 0, Family 6, Model 15, Stepping 13
Flags:
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)
PSE (Page size extension)
TSC (Time stamp counter)
MSR (Model specific registers)
PAE (Physical address extension)
MCE (Machine check exception)
CX8 (CMPXCHG8 instruction supported)
APIC (On-chip APIC hardware supported)
SEP (Fast system call)
MTRR (Memory type range registers)
PGE (Page global enable)
MCA (Machine check architecture)
CMOV (Conditional move instruction supported)
PAT (Page attribute table)
PSE-36 (36-bit page size extension)
CLFSH (CLFLUSH instruction supported)
DS (Debug store)
ACPI (ACPI supported)
MMX (MMX technology supported)
FXSR (Fast floating-point save and restore)
SSE (Streaming SIMD extensions)
SSE2 (Streaming SIMD extensions 2)
SS (Self-snoop)
HTT (Hyper-threading technology)
TM (Thermal monitor supported)
PBE (Pending break enabled)
Version: Intel(R) Core(TM)2 Duo CPU T5450 @ 1.66GHz
Voltage: 1.1 V
External Clock: 166 MHz
Max Speed: 1667 MHz
Current Speed: 1667 MHz
Status: Populated, Enabled
Upgrade: None
L1 Cache Handle: 0x0005
L2 Cache Handle: 0x0006
L3 Cache Handle: Not Provided
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified

Handle 0x0005, DMI type 7, 19 bytes
Cache Information
Socket Designation: Internal L1 Cache
Configuration: Enabled, Not Socketed, Level 1
Operational Mode: Write Back
Location: Internal
Installed Size: 64 kB
Maximum Size: 64 kB
Supported SRAM Types:
Burst
Installed SRAM Type: Burst
Speed: Unknown
Error Correction Type: Unknown
System Type: Unified
Associativity: 4-way Set-associative

Handle 0x0006, DMI type 7, 19 bytes
Cache Information
Socket Designation: Internal L2 Cache
Configuration: Enabled, Not Socketed, Level 2
Operational Mode: Write Back
Location: External
Installed Size: 2048 kB
Maximum Size: 2048 kB
Supported SRAM Types:
Burst
Installed SRAM Type: Burst
Speed: Unknown
Error Correction Type: None
System Type: Unified
Associativity: 4-way Set-associative

Handle 0x0007, DMI type 9, 13 bytes
System Slot Information
Designation: PC CARD-Slot 0
Type: 32-bit PC Card (PCMCIA)
Current Usage: Available
Length: Short
ID: Adapter 0, Socket 0
Characteristics:
5.0 V is provided
3.3 V is provided
PC Card-16 is supported
Cardbus is supported
PME signal is supported

Handle 0x0008, DMI type 10, 6 bytes
On Board Device Information
Type: Video
Status: Enabled
Description: 8

Handle 0x0009, DMI type 11, 5 bytes
OEM Strings
String 1: www.hp.com
String 2: ABS 70/71 79 7A 7B 7C

Handle 0x000A, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 4 GB
Error Information Handle: No Error
Number Of Devices: 2

Handle 0x000B, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x000A
Error Information Handle: No Error
Total Width: 64 bits
Data Width: 64 bits
Size: 512 MB
Form Factor: SODIMM
Set: None
Locator: DIMM #1
Bank Locator: Not Specified
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz
Manufacturer: Hyundai Electronics
Serial Number: 0000403D
Asset Tag: Not Specified
Part Number: HYMP564S64CP6-Y5

Handle 0x000C, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x000A
Error Information Handle: No Error
Total Width: 64 bits
Data Width: 64 bits
Size: 512 MB
Form Factor: SODIMM
Set: None
Locator: DIMM #2
Bank Locator: Not Specified
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz
Manufacturer: Hyundai Electronics
Serial Number: 0000403A
Asset Tag: Not Specified
Part Number: HYMP564S64CP6-Y5

Handle 0x000D, DMI type 19, 15 bytes
Memory Array Mapped Address
Starting Address: 0x00000000000
Ending Address: 0x0003FFFFFFF
Range Size: 1 GB
Physical Array Handle: 0x000A
Partition Width: 0

Handle 0x000E, DMI type 20, 19 bytes
Memory Device Mapped Address
Starting Address: 0x00000000000
Ending Address: 0x0001FFFFFFF
Range Size: 512 MB
Physical Device Handle: 0x000B
Memory Array Mapped Address Handle: 0x000D
Partition Row Position: 1

Handle 0x000F, DMI type 20, 19 bytes
Memory Device Mapped Address
Starting Address: 0x00020000000
Ending Address: 0x0003FFFFFFF
Range Size: 512 MB
Physical Device Handle: 0x000C
Memory Array Mapped Address Handle: 0x000D
Partition Row Position: 2

Handle 0x0010, DMI type 22, 26 bytes
Portable Battery
Location: Primary
Manufacturer: Hewlett-Packard
Manufacture Date: 11/13/2007
Serial Number: 27074
Name: HP
Chemistry: Lithium Ion
Design Capacity: 25500 mWh
Design Voltage: 14400 mV
SBDS Version: Not Specified
Maximum Error: Unknown
OEM-specific Information: 0x00000000

Handle 0x0011, DMI type 126, 26 bytes
Inactive

Handle 0x0012, DMI type 32, 11 bytes
System Boot Information
Status: No errors detected

Handle 0x0085, DMI type 133, 34 bytes
OEM-specific Type
Header and Data:
85 22 85 00 01 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00
00 00

Strings:

No battery

Handle 0x0086, DMI type 134, 34 bytes
OEM-specific Type
Header and Data:
86 22 86 00 01 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00
00 00
Strings:



Handle 0x0013, DMI type 144, 26 bytes
OEM-specific Type
Header and Data:
90 1A 13 00 FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF 00 00

Handle 0x0014, DMI type 127, 4 bytes
End Of Table



As you can see it will prodeuce hell lot of information.

Ethtool:

This tools to masure and know information about the attached ethernet card.Like the previous one this tool is also available with most of distributions repository.

bhaskar@bhaskar-laptop_05:37:54_Thu Sep 02:~> sudo /usr/sbin/ethtool -i eth0
driver: tg3
version: 3.108
firmware-version: sb v2.09
bus-info: 0000:18:00.0

bhaskar@bhaskar-laptop_05:38:06_Thu Sep 02:~> sudo /usr/sbin/ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: Unknown! (65535)
Duplex: Unknown! (255)
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: g
Current message level: 0x000000ff (255)
Link detected: no





Blkid:

This tool is for getting the device id ,which is very unique to help the bootloader think properly.In other word not messed up with bootloader if you put this indentification number of disk instead of directly mention them like this /dev/sdX.

bhaskar@bhaskar-laptop_05:48:57_Thu Sep 02:~> sudo /sbin/blkid
Password:
/dev/sda1: UUID="f6f903f1-03cd-4387-933c-8c928514c958" TYPE="ext3" SEC_TYPE="ext2"
/dev/sda2: UUID="a9380f41-173f-41be-8e20-b14fb78eaf9a" TYPE="swap"
/dev/sda3: UUID="3cccbf0e-0354-43b4-b89a-ceee1fcadb31" TYPE="ext3" SEC_TYPE="ext2"
/dev/sda5: LABEL="/" UUID="a217eb70-52b1-4e20-8841-7cb366a54c40" TYPE="ext3"
/dev/sda6: UUID="73917641-fbaf-4910-bf2a-5d86d93fb1ca" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda7: LABEL="Fedora-12-i686-L" UUID="0ba812ef-d38e-4fb6-9a2d-79fcb13768aa" TYPE="ext4"
/dev/sda8: UUID="VwXE29-5Um4-zG0d-PCXe-Anz6-k876-CT3v0G" TYPE="LVM2_member"
/dev/mapper/bhaskarlaptop-data: UUID="09ac6747-95b8-4b62-ac0e-5b80adcd13fe" TYPE="ext3"


It has got so many useful flags through which you can get lot out of it. Please see the manpage reagrding this tool and every tool.

UUID:

As you can understand this is an abbreviation and the full form is "Universally Unique Identifier", which if you can see the previous command on this page; that is apprent from the command output of "blkid" right?

Now if you want to generate a new one means new "Universally Unique Identifier", then you have follow this way,basically it can done by two means one by is generated randomly or through "r" flag of uuidgen binary ot by time base with the help of "-t" flag.Ok I will show you both below:

Time Based:
bhaskar@bhaskar-laptop_06:05:51_Thu Sep 02:~> sudo /usr/bin/uuidgen -t
Password:
0fb2cfd4-b62a-11df-b336-001a4b90dadc


Randomized:
bhaskar@bhaskar-laptop_06:06:43_Thu Sep 02:~> sudo /usr/bin/uuidgen -r
Password:
c31645c4-7d72-493b-a85c-adadd61a0e49


Cool!! right.

Socklist:

As you can guess from the name that this command will going to enlist the socket running on the system for that it turn to /proc file system.

bhaskar@bhaskar-laptop_06:30:19_Thu Sep 02:~> sudo /usr/bin/socklist
type port inode uid pid fd name
tcp 111 7001 0 3010 8 rpcbind
tcp 80 6061 0 4077 3 httpd
tcp 53 5985 0 2792 21 named
tcp 53 5983 0 2792 20 named
tcp 25 6329 0 2904 12 master
tcp 953 5993 0 2792 22 named
tcp 17500 14128 1000 3047 18 dropbox
tcp 646 7030 0 3014 3 famd
tcp 80 0 0 0 0
udp 53 5984 0 2792 513 named
udp 53 5982 0 2792 512 named
udp 17500 14124 1000 3047 15 dropbox
udp 111 6995 0 3010 6 rpcbind
udp 123 5934 0 2791 5 ntpd
udp 641 7000 0 3010 7 rpcbind




Udisks:

This tool will show the system bus service with attached devices.It will spit out quite a verbose information.

bhaskar@bhaskar-laptop_06:37:01_Thu Sep 02:~> sudo /usr/bin/udisks --dump
========================================================================
Showing information for /org/freedesktop/UDisks/devices/dm_2d0
native-path: /sys/devices/virtual/block/dm-0
device: 254:0
device-file: /dev/dm-0
presentation: /dev/dm-0
by-id: /dev/disk/by-id/dm-name-bhaskarlaptop-data
by-id: /dev/disk/by-id/dm-uuid-LVM-gQo1BYHBfV6WxRuYfF3PO3YRgD1QSX7HyRhtgrM7prRmAE41YvqJsbtBRAA9wvdt
by-id: /dev/disk/by-uuid/09ac6747-95b8-4b62-ac0e-5b80adcd13fe
detected at: Wed 01 Sep 2010 10:34:56 PM IST
system internal: 1
removable: 0
has media: 1 (detected at Wed 01 Sep 2010 10:34:56 PM IST)
detects change: 0
detection by polling: 0
detection inhibitable: 0
detection inhibited: 0
is read only: 0
is mounted: 1
mount paths: /lvm
mounted by uid: 0
presentation hide: 0
presentation nopolicy: 1
presentation name:
presentation icon:
size: 26843545600
block size: 512
job underway: no
usage: filesystem
type: ext3
version: 1.0
uuid: 09ac6747-95b8-4b62-ac0e-5b80adcd13fe
label:
LVM2 Logical Volume:
LV name: data
LV uuid: yRhtgr-M7pr-RmAE-41Yv-qJsb-tBRA-A9wvdt
VG name: bhaskarlaptop
VG uuid: gQo1BY-HBfV-6WxR-uYfF-3PO3-YRgD-1QSX7H

========================================================================
Showing information for /org/freedesktop/UDisks/devices/sda
native-path: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
device: 8:0
device-file: /dev/sda
presentation: /dev/sda
by-id: /dev/disk/by-id/ata-ST9160821AS_5MA8QHLW
by-id: /dev/disk/by-id/scsi-SATA_ST9160821AS_5MA8QHLW
by-path: /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0
detected at: Wed 01 Sep 2010 10:34:55 PM IST
system internal: 1
removable: 0
has media: 1 (detected at Wed 01 Sep 2010 10:34:55 PM IST)
detects change: 0
detection by polling: 0
detection inhibitable: 0
detection inhibited: 0
is read only: 0
is mounted: 0
mount paths:
mounted by uid: 0
presentation hide: 0
presentation nopolicy: 0
presentation name:
presentation icon:
size: 160041885696
block size: 512
job underway: no
usage:
type:
version:
uuid:
label:
partition table:
scheme: mbr
count: 8
drive:
vendor: ATA
model: ST9160821AS
revision: 3.BHE
serial: 5MA8QHLW
WWN:
detachable: 0
can spindown: 1
rotational media: Yes, unknown rate
write-cache: enabled
ejectable: 0
adapter: /org/freedesktop/UDisks/adapters/0000_3a00_3a1f_2e2
ports:
/org/freedesktop/UDisks/adapters/0000_3a00_3a1f_2e2/host0
similar devices:
media:
compat:
interface: ata
if speed: (unknown)
ATA SMART: Updated at Thu 02 Sep 2010 06:10:21 AM IST
overall assessment: UNKNOWN
===============================================================================
Attribute Current|Worst|Threshold Status Value Type Updates
===============================================================================
raw-read-error-rate 113|100| 6 good 52163879 Pre-fail Online
spin-up-time 99| 99| 0 n/a 0 Old-age Online
start-stop-count 97| 97| 20 good 3771 Pre-fail Online
reallocated-sector-count 100|100| 36 good 0 sectors Pre-fail Online
seek-error-rate 68| 60| 30 good 133359356520 Pre-fail Online
power-on-hours 94| 94| 0 n/a 225.4 days Old-age Online
spin-retry-count 100|100| 34 good 0 Pre-fail Online
power-cycle-count 98| 98| 20 good 2062 Pre-fail Online
attribute-184 100|253| 0 n/a 0 Old-age Online
reported-uncorrect 100|100| 0 n/a 0 sectors Old-age Online
attribute-188 100|100| 45 good 0 Old-age Online
high-fly-writes 90| 90| 0 n/a 10 Old-age Online
airflow-temperature-celsius 52| 36| 0 n/a 48C / 118F Old-age Online
power-off-retract-count 100|100| 0 n/a 213 Old-age Online
load-cycle-count 1| 1| 0 n/a 207899 Old-age Online
temperature-celsius-2 48| 64| 0 n/a 48C / 118F Old-age Online
hardware-ecc-recovered 82| 61| 0 n/a 225063895 Old-age Offline
current-pending-sector 100|100| 0 n/a 0 sectors Old-age Online
offline-uncorrectable 100|100| 0 n/a 0 sectors Old-age Offline
udma-crc-error-count 200|200| 0 n/a 0 Old-age Online
multi-zone-error-rate 100|253| 0 n/a 0 Old-age Offline
ta-increase-count 100|253| 0 n/a 0 Old-age Offline

========================================================================
Showing information for /org/freedesktop/UDisks/devices/sda1
native-path: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1
device: 8:1
device-file: /dev/sda1
presentation: /dev/sda1
by-id: /dev/disk/by-id/ata-ST9160821AS_5MA8QHLW-part1
by-id: /dev/disk/by-id/scsi-SATA_ST9160821AS_5MA8QHLW-part1
by-id: /dev/disk/by-uuid/f6f903f1-03cd-4387-933c-8c928514c958
by-path: /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part1
detected at: Wed 01 Sep 2010 10:34:56 PM IST
system internal: 1
removable: 0
has media: 1 (detected at Wed 01 Sep 2010 10:34:56 PM IST)
detects change: 0
detection by polling: 0
detection inhibitable: 0
detection inhibited: 0
is read only: 0
is mounted: 0
mount paths:
mounted by uid: 0
presentation hide: 0
presentation nopolicy: 0
presentation name:
presentation icon:
size: 50001444864
block size: 512
job underway: no
usage: filesystem
type: ext3
version: 1.0
uuid: f6f903f1-03cd-4387-933c-8c928514c958
label:
partition:
part of: /org/freedesktop/UDisks/devices/sda
scheme: mbr
number: 1
type: 0x83
flags:
offset: 32256
alignment offset: 0
size: 50001444864
label:
uuid:

========================================================================
Showing information for /org/freedesktop/UDisks/devices/sda2
native-path: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda2
device: 8:2
device-file: /dev/sda2
presentation: /dev/sda2
by-id: /dev/disk/by-id/ata-ST9160821AS_5MA8QHLW-part2
by-id: /dev/disk/by-id/scsi-SATA_ST9160821AS_5MA8QHLW-part2
by-id: /dev/disk/by-uuid/a9380f41-173f-41be-8e20-b14fb78eaf9a
by-path: /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part2
detected at: Wed 01 Sep 2010 10:34:56 PM IST
system internal: 1
removable: 0
has media: 1 (detected at Wed 01 Sep 2010 10:34:56 PM IST)
detects change: 0
detection by polling: 0
detection inhibitable: 0
detection inhibited: 0
is read only: 0
is mounted: 0
mount paths:
mounted by uid: 0
presentation hide: 0
presentation nopolicy: 0
presentation name:
presentation icon:
size: 2303078400
block size: 512
job underway: no
usage: other
type: swap
version: 2
uuid: a9380f41-173f-41be-8e20-b14fb78eaf9a
label:
partition:
part of: /org/freedesktop/UDisks/devices/sda
scheme: mbr
number: 2
type: 0x82
flags:
offset: 50001477120
alignment offset: 0
size: 2303078400
label:
uuid:

========================================================================
Showing information for /org/freedesktop/UDisks/devices/sda3
native-path: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda3
device: 8:3
device-file: /dev/sda3
presentation: /dev/sda3
by-id: /dev/disk/by-id/ata-ST9160821AS_5MA8QHLW-part3
by-id: /dev/disk/by-id/scsi-SATA_ST9160821AS_5MA8QHLW-part3
by-id: /dev/disk/by-uuid/3cccbf0e-0354-43b4-b89a-ceee1fcadb31
by-path: /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part3
detected at: Wed 01 Sep 2010 10:34:56 PM IST
system internal: 1
removable: 0
has media: 1 (detected at Wed 01 Sep 2010 10:34:56 PM IST)
detects change: 0
detection by polling: 0
detection inhibitable: 0
detection inhibited: 0
is read only: 0
is mounted: 0
mount paths:
mounted by uid: 0
presentation hide: 0
presentation nopolicy: 0
presentation name:
presentation icon:
size: 13999426560
block size: 512
job underway: no
usage: filesystem
type: ext3
version: 1.0
uuid: 3cccbf0e-0354-43b4-b89a-ceee1fcadb31
label:
partition:
part of: /org/freedesktop/UDisks/devices/sda
scheme: mbr
number: 3
type: 0x83
flags:
offset: 52304555520
alignment offset: 0
size: 13999426560
label:
uuid:

========================================================================
Showing information for /org/freedesktop/UDisks/devices/sda4
native-path: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda4
device: 8:4
device-file: /dev/sda4
presentation: /dev/sda4
by-id: /dev/disk/by-id/ata-ST9160821AS_5MA8QHLW-part4
by-id: /dev/disk/by-id/scsi-SATA_ST9160821AS_5MA8QHLW-part4
by-path: /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part4
detected at: Wed 01 Sep 2010 10:34:56 PM IST
system internal: 1
removable: 0
has media: 1 (detected at Wed 01 Sep 2010 10:34:56 PM IST)
detects change: 0
detection by polling: 0
detection inhibitable: 0
detection inhibited: 0
is read only: 0
is mounted: 0
mount paths:
mounted by uid: 0
presentation hide: 0
presentation nopolicy: 0
presentation name:
presentation icon:
size: 1024
block size: 512
job underway: no
usage:
type:
version:
uuid:
label:
partition:
part of: /org/freedesktop/UDisks/devices/sda
scheme: mbr
number: 4
type: 0x05
flags:
offset: 66303982080
alignment offset: 0
size: 93735290880
label:
uuid:

========================================================================
Showing information for /org/freedesktop/UDisks/devices/sda5
native-path: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5
device: 8:5
device-file: /dev/sda5
presentation: /dev/sda5
by-id: /dev/disk/by-id/ata-ST9160821AS_5MA8QHLW-part5
by-id: /dev/disk/by-id/scsi-SATA_ST9160821AS_5MA8QHLW-part5
by-id: /dev/disk/by-uuid/a217eb70-52b1-4e20-8841-7cb366a54c40
by-path: /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part5
detected at: Wed 01 Sep 2010 10:34:56 PM IST
system internal: 1
removable: 0
has media: 1 (detected at Wed 01 Sep 2010 10:34:56 PM IST)
detects change: 0
detection by polling: 0
detection inhibitable: 0
detection inhibited: 0
is read only: 0
is mounted: 1
mount paths: /
mounted by uid: 0
presentation hide: 0
presentation nopolicy: 0
presentation name:
presentation icon:
size: 32901087744
block size: 512
job underway: no
usage: filesystem
type: ext3
version: 1.0
uuid: a217eb70-52b1-4e20-8841-7cb366a54c40
label:
partition:
part of: /org/freedesktop/UDisks/devices/sda
scheme: mbr
number: 5
type: 0x83
flags:
offset: 127138185216
alignment offset: 0
size: 32901087744
label:
uuid:

========================================================================
Showing information for /org/freedesktop/UDisks/devices/sda6
native-path: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6
device: 8:6
device-file: /dev/sda6
presentation: /dev/sda6
by-id: /dev/disk/by-id/ata-ST9160821AS_5MA8QHLW-part6
by-id: /dev/disk/by-id/scsi-SATA_ST9160821AS_5MA8QHLW-part6
by-id: /dev/disk/by-uuid/73917641-fbaf-4910-bf2a-5d86d93fb1ca
by-path: /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part6
detected at: Wed 01 Sep 2010 10:34:56 PM IST
system internal: 1
removable: 0
has media: 1 (detected at Wed 01 Sep 2010 10:34:56 PM IST)
detects change: 0
detection by polling: 0
detection inhibitable: 0
detection inhibited: 0
is read only: 0
is mounted: 0
mount paths:
mounted by uid: 0
presentation hide: 0
presentation nopolicy: 0
presentation name:
presentation icon:
size: 534610944
block size: 512
job underway: no
usage: filesystem
type: ext3
version: 1.0
uuid: 73917641-fbaf-4910-bf2a-5d86d93fb1ca
label:
partition:
part of: /org/freedesktop/UDisks/devices/sda
scheme: mbr
number: 6
type: 0x83
flags: boot
offset: 66304014336
alignment offset: 0
size: 534610944
label:
uuid:

========================================================================
Showing information for /org/freedesktop/UDisks/devices/sda7
native-path: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7
device: 8:7
device-file: /dev/sda7
presentation: /dev/sda7
by-id: /dev/disk/by-id/ata-ST9160821AS_5MA8QHLW-part7
by-id: /dev/disk/by-id/scsi-SATA_ST9160821AS_5MA8QHLW-part7
by-id: /dev/disk/by-uuid/0ba812ef-d38e-4fb6-9a2d-79fcb13768aa
by-path: /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part7
detected at: Wed 01 Sep 2010 10:34:56 PM IST
system internal: 1
removable: 0
has media: 1 (detected at Wed 01 Sep 2010 10:34:56 PM IST)
detects change: 0
detection by polling: 0
detection inhibitable: 0
detection inhibited: 0
is read only: 0
is mounted: 0
mount paths:
mounted by uid: 0
presentation hide: 0
presentation nopolicy: 0
presentation name:
presentation icon:
size: 10742183424
block size: 512
job underway: no
usage: filesystem
type: ext4
version: 1.0
uuid: 0ba812ef-d38e-4fb6-9a2d-79fcb13768aa
label: Fedora-12-i686-L
partition:
part of: /org/freedesktop/UDisks/devices/sda
scheme: mbr
number: 7
type: 0x83
flags:
offset: 66838657536
alignment offset: 0
size: 10742183424
label:
uuid:

========================================================================
Showing information for /org/freedesktop/UDisks/devices/sda8
native-path: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8
device: 8:8
device-file: /dev/sda8
presentation: /dev/sda8
by-id: /dev/disk/by-id/ata-ST9160821AS_5MA8QHLW-part8
by-id: /dev/disk/by-id/scsi-SATA_ST9160821AS_5MA8QHLW-part8
by-path: /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part8
detected at: Wed 01 Sep 2010 10:34:56 PM IST
system internal: 1
removable: 0
has media: 1 (detected at Wed 01 Sep 2010 10:34:56 PM IST)
detects change: 0
detection by polling: 0
detection inhibitable: 0
detection inhibited: 0
is read only: 0
is mounted: 0
mount paths:
mounted by uid: 0
presentation hide: 0
presentation nopolicy: 0
presentation name:
presentation icon:
size: 49557279744
block size: 512
job underway: no
usage: raid
type: LVM2_member
version: LVM2\x20001
uuid: VwXE29-5Um4-zG0d-PCXe-Anz6-k876-CT3v0G
label:
partition:
part of: /org/freedesktop/UDisks/devices/sda
scheme: mbr
number: 8
type: 0x8e
flags:
offset: 77580873216
alignment offset: 0
size: 49557279744
label:
uuid:

========================================================================
Showing information for /org/freedesktop/UDisks/devices/sr0
native-path: /sys/devices/pci0000:00/0000:00:1f.1/host3/target3:0:0/3:0:0:0/block/sr0
device: 11:0
device-file: /dev/sr0
presentation: /dev/sr0
by-path: /dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:0:0
detected at: Wed 01 Sep 2010 10:34:55 PM IST
system internal: 0
removable: 1
has media: 0
detects change: 1
detection by polling: 1
detection inhibitable: 1
detection inhibited: 0
is read only: 0
is mounted: 0
mount paths:
mounted by uid: 0
presentation hide: 0
presentation nopolicy: 0
presentation name:
presentation icon:
size: 0
block size: 0
job underway: no
usage:
type:
version:
uuid:
label:
drive:
vendor: Optiarc
model: DVD RW AD-7560A
revision: DH10
serial:
WWN:
detachable: 0
can spindown: 0
rotational media: Yes, unknown rate
write-cache: unknown
ejectable: 1
adapter: /org/freedesktop/UDisks/adapters/0000_3a00_3a1f_2e1
ports:
/org/freedesktop/UDisks/adapters/0000_3a00_3a1f_2e1/host3
similar devices:
media:
compat: optical_cd optical_cd_r optical_cd_rw optical_dvd optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r optical_dvd_ram optical_dvd_rw optical_mrw optical_mrw_w
interface: scsi
if speed: (unknown)
ATA SMART: not available

========================================================================


I have choose to spit out evrythig with the "--dump" option. You can select lot many thing individually by going through the man page of it.

IPCALC:

This tool will aid you to reveal the base internals of an ip address.It helps an network administrator to figure out the subnet/ip range/netmask very easily by one single command.So how it look like ? Here is the output of the command look :

root@bhaskar-laptop_06:45:35_Thu Sep 2:/ # ipcalc 127.0.0.1
Address: 127.0.0.1 01111111.00000000.00000000. 00000001
Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000
Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111
=>
Network: 127.0.0.0/24 01111111.00000000.00000000. 00000000
HostMin: 127.0.0.1 01111111.00000000.00000000. 00000001
HostMax: 127.0.0.254 01111111.00000000.00000000. 11111110
Broadcast: 127.0.0.255 01111111.00000000.00000000. 11111111
Hosts/Net: 254 Class A, Loopback


You can put any ip-address as an argument.

Ok enough..not to bloat your mind with more information. May be some other related post of mine might reveal bunch of useful tool to navigate through the GNU/Linux system. I have ignored "lsof","lslk","fuser"and many more,because I found that those informations are easily available.

Cheers!
Bhaskar