First user philosophy

Michael Wardle michael at endbracket.net
Wed Aug 10 04:26:08 UTC 2005


The standard UNIX password database (contained in the files /etc/passwd 
and /etc/shadow on Linux) defines the login name of user 0 as "root". 
User 0 is usually the first entry in the database and will exist before 
any users are added by the system administrator.

When the system boots, the first process the kernel starts is called 
"init".  All processes started by the kernel are started as root.

After init is started, init starts a process as root for every terminal 
or display (as configured in /etc/inittab) to allow users to log in. 
Typical such programs are getty or gdm.  These programs in turn 
authenticate the user, change their effective user to the user you 
authenticated as, then start the user's shell or desktop.

You can look at the process tree using "ps -ef" or "ps ajx".  Note that:
- init is running as user 0, also known as root (UID column)
- init has process identifier 1 (PID)
- init is the parent process of other processes such as gdm (PPID)




More information about the ubuntu-users mailing list