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

free

top

ifconfig

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

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

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