Beruflich Dokumente
Kultur Dokumente
Architecture-Dependent Code
Hardware
The Users
fork fork
inetd exec exec
lpd
/etc/getty /etc/getty condition terminal for login
httpd
exec exec
/bin/login /bin/login check password
exec exec
shell shell command interpreter
Parts of process memory structure
•user-id switches on system call
•open files (trap, software interrupt)
•saved register states
•environment
Stack frames of
invoced functions
Program code
process structure
Bin dev etc home lib mnt proc tmp usr var
/etc/passwd, /etc/shadow
users, their permissions and parameters
/etc/inittab
what processes/deamons to start automatically on
system start-up
???
Environment Variables
[root@unix /]# env
HOSTNAME=unix.mii.lu.lv
TERM=vt100
SHELL=/bin/bash
HISTSIZE=1000
SSH_CLIENT=::ffff:81.198.226.108 1289 22
SSH_TTY=/dev/pts/3
USER=root
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:
USERNAME=root
MAIL=/var/spool/mail/root
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
INPUTRC=/etc/inputrc
PWD=/
LANG=en_US.UTF-8
SHLVL=1
HOME=/root
BASH_ENV=/root/.bashrc
LOGNAME=root
SSH_CONNECTION=::ffff:81.198.226.108 1289 ::ffff:159.148.108.245 22
LESSOPEN=|/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES=1
_=/bin/env
OLDPWD=/sys
[root@unix /]#
Different Shells
Bourne
C Shell
Korn Shell
BASH Last login: Tue Sep 21 07:58:17 2004 from 81.198.226.108
[root@unix root]#
[root@unix root]# ps
PID TTY TIME CMD
20879 pts/7 00:00:00 bash
20905 pts/7 00:00:00 ps
[root@unix root]#
[root@unix root]# ls -l
total 64
-rw-r--r-- 1 root root 1204 Sep 20 16:11 anaconda-ks.cfg
-rw-r--r-- 1 root root 49872 Sep 20 16:11 install.log
-rw-r--r-- 1 root root 2306 Sep 20 16:11 install.log.syslog
[root@unix root]#
[root@unix root]# pwd
/root
[root@unix root]#
Users
[root@unix etc]# more passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
Password
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
news:x:9:13:news:/etc/news:
uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin
settings
dima:x:500:500::/home/dima:/bin/bash
[root@unix etc]#
shell root:$1$Bev12JLP$T5GdFIiCIK67bwRSVGaMr.:12681:0:99999:7:::
bin:*:12681:0:99999:7:::
daemon:*:12681:0:99999:7:::
home
adm:*:12681:0:99999:7:::
lp:*:12681:0:99999:7:::
sync:*:12681:0:99999:7:::
shutdown:*:12681:0:99999:7:::
Power Power
on off
Boot- Kernel OS RUN! Shut
loader Init Init down