Where is your encrypted password stored under *nix.

 Posted by at 11:39 pm  Linux, Linux How To  Comments Off on Where is your encrypted password stored under *nix.
Apr 162010

So I went for an interview and one of the panel grilling me asked where, under *nix, is your encrypted password stored? I new /etc/passwd contained seven fields of detail for each user account, but I couldn’t remember where the encrypted passwords were stored! The answer is /etc/shadow (- r w – r – – – – – -).

The seven fields in the /etc/passwd file are separated with colons:

  1. User name
  2. Password
  3. User ID
  4. Group ID
  5. User ID Infor
  6. Home Directory
  7. command shell path

In the /etc/shadow file, the first character is a ! if the account is locked

Check this link for Solaris root password recovery.

Linux File Information Overview

 Posted by at 2:39 pm  Linux, Linux How To  Comments Off on Linux File Information Overview
Apr 162010

View permissions with ls -l

Output is seven columns: type & permissions, link count, owner, group, size, date & time last mod, name

Type & Permissions displayed as 10 positions: first position is Type, last nine are permissions.

Types: d, -, l, s, p, c, d.

d = directory

– = regular file

l = symbolic link

s = unix domain socket

p = named pipe

c = character device file

b = block device file

Permissions are displayed a a collection of 3 x 3, or nine bits: ——— and can be imagined as — — —

Each position can be r, w, or x for read, write, and execute respectively

Permissions are also expressed as Octel digits 0 through 7:

0 = —

1 = –x

2 = -w-

3 = -wx

4 = r–

5 = r-x

6 = rw-

7 = rwx

Use chmod to modify permissions

Linux Commands

 Posted by at 6:30 am  Linux, Linux How To  Comments Off on Linux Commands
Aug 012009

df -h��������������������������������������������� disk free human readable




ps -e��������������������������������������������� Complete process list

cat /etc/passwd | sort –key=1,3������ User listing sorted by alpha

cat /etc/network/interfaces�������������� view interfaces

IP Route Management

 Posted by at 11:27 pm  Linux, Linux Research  Comments Off on IP Route Management
Jul 312009

I was searching for something regarding IP Addresses, looking for a database of IP networks by country and stumbled on a nice page about “IP Route Management.”� I started looking at the manu pages on the ‘ip’ and ‘route’ command for unix and linux, and discovering the wealth of feature and possibilities. There is a file in /etc/iproute2 called ‘rt_tables’ that specifies the names of the routing tables.� In the narative, an example routing table is called special, and of course my righ had named that, but a quick cat of rt_tables revealed ‘local’, ‘main’, and ‘default’.� More interesting was the use of ‘ip route add’ and ‘ip route add prohibit ###.###.###.### from ###.###.###.###’ to block access to a particular host “from” a specific host.� I don’t have specific cause to need this at this tiime, but its agood read and I’d like to research some of the reasons why that might be done.� ‘ip route add nat’ is another item that is use full and deserved additional scrutiny.