Another Simple Scriptlet To Make The Unix And Linux CLI More User Friendly
Nov 24, 2008, 10:03 (2 Talkback[s])
(Other stories by Mike Tremell)
[ Thanks to Mike
Golvach for this link. ]
"Our little foray into variable interpolation today has
to do with making /etc/passwd just a bit more accessible. Most
folks are familiar with the 7 colon-separated fields of this file
(if not, they're: The user's Username, an encrypted password (or
usually an "x" if you're using a shadow password system), the
user's UID, the user's GID, the user's gecos information (Also
referred to as the "comment field," usually either empty or
populated with a short description to make the account more easily
recognizable) , the user's home directory and, finally, the user's
default shell)
"Now, say what you will about the structure and setup of the
passwd file, but it's fairly easy to follow. Almost everything in
it is the opposite of cryptic. The password field (field number 2)
is, of course, not going to be tailored for your ease of
understanding ;) If you get really lucky and you hop on a machine
that actually lists the encrypted password in field two of
/etc/passwd, you can copy the file to any remote machine and go to
work on it. We've posted quite a few scripts to do automated
password cracking."
Complete Story
Related Stories:
- Plain English Explanation Of An Awk Statement For Linux Or Unix(Nov 22, 2008)
- Convoluted Column Arithmetic Examples Using Awk On Linux Or Unix(Nov 21, 2008)
- Bash Cable, Dish and Local TV Listings Script For Linux Or Unix(Nov 20, 2008)
- Bash One-Liner Script To Produce Somewhat-Fancy Output Of Who's Logged In(Nov 19, 2008)
- Fake Unix and Linux Advisory - The /dev/null Vulnerability(Nov 17, 2008)
- Basic Veritas Cluster Server Troubleshooting(Nov 16, 2008)
- XKCD - Linux, Unix And Other Funny Cartoons(Nov 16, 2008)
- Getting CPU Information From Various Flavours Of Linux And Unix(Nov 14, 2008)