ASO 1 Introduction
ASO 1 Introduction
Contents I
1 The role of the System Administrator
system administrator
tasks of the system administrator
2 Users and groups
users
groups
user and group definition files
3 Files, processes and devices
files and directories
other types of files
commands for dealing with files
processes
processes and programs: the path
signals
Introduction to System Administration
Contents II
commands to dealing with processes
devices
4 Becoming superuser
loging in as root
the su command
the sudo command
6 Different UNIXes
unix definitions and implementations
System V
POSIX
BSD
Introduction to System Administration
The role of the System Administrator
things to do
what is a user?
user accounts are the mean by which real world users present
themselves to the system and are granted (or denied) access
to it
authentification is the process by which the system verifies
that a user is who he/she claims to be
a user in the system is an entity that can own files and
execute programs (thus creating processes). It may or may
not be a real person
Introduction to System Administration
Users and groups
users
privilege separation
what is a group?
Some systems have specific files that are not found on other
systems
/etc/gshadow only on linux
/etc/master.passwd only on BSD systems
Introduction to System Administration
Files, processes and devices
Each file in the system is owned by both ONE user and ONE
group
the user owning the file may belong to several groups, but the
file is owned only by one group
The file has three sets of permissions associated (usually
called the mode of the file)
each set of permissions is a subset of the word rwx
the letter indicates the permission is granted
the - sign instead the letter indicates the permission is not
granted
Introduction to System Administration
Files, processes and devices
files and directories
The first set are the permissions for the user owning the file,
the second set the permissions for the group owning the file
and the third set the permissions for the rest of the users in
the system
r the file can be read: view the file contents
w the file can be written: modify the file contents, that is, the
file can be appended, modified, overwritten . . .
x the file can be executed
Introduction to System Administration
Files, processes and devices
files and directories
example
-rw-r----- 1 antonio audio 4656065 Sep 13 13:06 audiofile.mp3
this file is owned by user antonio and group audio, its
permissions are rw-r----- (the first - indicates it’s a regular
file)
the first set of permissions, rw-, means that a process from
user antonio can read and write to the file
the second set of permissions, r--, means that a process from
any user belonging to group audio can read the file
the third set of permissions, ---, means that the rest of the
users in the system can’t read the file, nor write to it, neither
execute it (were it an executable file)
Introduction to System Administration
Files, processes and devices
files and directories
permission representations
special permissions
its permissions are rwsr-sr-x (binary 110 111 101 101, octal
6755)
processes from user antonio can read write and execute the file
processes from users belonging to group audio can read and
execute the file
processes from any user can read and execute the file
a process executing the file gets its user credential changed to
that of user antonio and its group credential changed to that
of group audio
Introduction to System Administration
Files, processes and devices
files and directories
permissions in directories
non symbolic links are not special files, they are just another
name to an existing file
the comand ls -l lets us distinguish the different types of
files in a unix system
abyecto:/home/antonio/pru# ls -l
total 12
brw-r--r-- 1 root root 15, 3 Sep 13 18:02 block_device
crw-r--r-- 1 root root 9, 51 Sep 13 18:14 char_device
-rw-r--r-- 2 root root 93 Sep 13 18:03 file
-rw-r--r-- 2 root root 93 Sep 13 18:03 link
lrwxrwxrwx 1 root root 4 Sep 13 18:18 symlink -> file
drwxr-xr-x 2 root root 4096 Sep 13 18:01 this_is_a_directory
prw-r--r-- 1 root root 0 Sep 13 18:03 this_is_a_fifo
Introduction to System Administration
Files, processes and devices
commands for dealing with files
processes
processes
process credentials
the system uses what we call process credentials to determine
which user and group are responsible of the execution of a
process
each credential pair consists of a user credential and a group
credential, that we call the uid and gid of the process
there are three pairs of credentials: real, effective and saved,
so one process has real uid, real gid, effective uid, effective gid
saved uid and saved gid.
the effective credentials are used to determine the preivileges
(which files can be accessed . . . ); the real credentials
represent the real user behind the process (thet are used to
decide from which processes signals can be received); saved
credentials indicate which changes ob the efective credentials
con be made.
Introduction to System Administration
Files, processes and devices
processes
types of processes
the path
the path
signals
signals
devices
devices
Becoming superuser
Introduction to System Administration
Becoming superuser
Becoming superuser
→loging in as root
Introduction to System Administration
Becoming superuser
loging in as root
login as root
Becoming superuser
→the su command
Introduction to System Administration
Becoming superuser
the su command
Becoming superuser
→the sudo command
Introduction to System Administration
Becoming superuser
the sudo command
x delete a character
dw delete a word
dd delete a line
:w save changes
:q exit editor
:wq quit saving changes
:q! quit discarding changes
a brief manual of the editor (although in Spanish) can be
found at
http://www.dc.fi.udc.es/~afyanez/info-vi/index.html
Introduction to System Administration
Different UNIXes
Different UNIXes
Introduction to System Administration
Different UNIXes
unix definitions and implementations
Different UNIXes
→unix definitions and implementations
Introduction to System Administration
Different UNIXes
unix definitions and implementations
Different UNIXes
→System V
Introduction to System Administration
Different UNIXes
System V
system V
Different UNIXes
→POSIX
Introduction to System Administration
Different UNIXes
POSIX
POSIX
Different UNIXes
→BSD
Introduction to System Administration
Different UNIXes
BSD
BSD