MultiUser Concepts ORAFACT Multiuser Concepts Traditional UNIX operation

  • Slides: 12
Download presentation
Multi-User Concepts ORAFACT

Multi-User Concepts ORAFACT

Multi-user Concepts Traditional UNIX operation • mainframe host - dumb terminal Linux has been

Multi-user Concepts Traditional UNIX operation • mainframe host - dumb terminal Linux has been multi-user from the beginning Multi-user vs. multiple users Importance of the system knowing who you are • security • enforcing limits on system resources ORAFACT

got root? Many operating systems have the concept of a super user This super,

got root? Many operating systems have the concept of a super user This super, or privileged, user has special access rights and privileges on the system The root user is the privileged user on most UNIX-like systems • change to any directory and read and write to files regardless of the permissions set on those files • install software and make it available system wide • modify device settings • modify the network configuration • change the time on the system • add users to the system • assume identity of any user on the system ORAFACT

Logging In Graphical logins • xdm, gdm, kdm, etc. Network logins • telnet, rlogin,

Logging In Graphical logins • xdm, gdm, kdm, etc. Network logins • telnet, rlogin, rsh, ssh • login ORAFACT

Boot Process 1. When a Linux system boots, it must first locate and load

Boot Process 1. When a Linux system boots, it must first locate and load the kernel. 2. When the kernel finishes its loading process, it loads and passes control to some initial process, usually the program init. 3. The init process goes through its initialization procedures, part of which is to enter the currently defined run-level. Run-levels among other things determine if the system will display a text or graphical login prompt at the console. 4. For a text mode login, init spawns one or more getty-like processes and associates them with the appropriate terminals. In the case of actual serial terminals, the process started is usually /sbin/getty or /sbin/agetty. In the case of virtual terminals, a simpler getty-like process is usually invoked such as /sbin/mingetty. 5. To provide for graphical logins, init spawns one of the graphical display managers such as xdm, gdm or kdm. ORAFACT

Boot Process 6. The getty, agetty or mingetty process is the second of the

Boot Process 6. The getty, agetty or mingetty process is the second of the three programs (init, getty and login) used by the system to allow users to login. getty or agetty is invoked by init to: Open tty lines and set their modes. Print the login banner, usually the contents of /etc/issue. Spawn a login process for the user, usually /bin/login. 7. The login program is what actually prompts the user to input their username and password. login will then validate the user and start the shell defined in the user's corresponding /etc/password entry. ORAFACT

Switching User Contexts su Run a shell with substituted UID and GID values (switch

Switching User Contexts su Run a shell with substituted UID and GID values (switch to another user account) • no parameters assumes you want to switch to root • - short for -l or --login and will make the new shell a login shell (process the shell initialization files and set up the environment as if an actual login has occurred) ORAFACT

Gathering Login Session Info Who are you really? • UID - user id •

Gathering Login Session Info Who are you really? • UID - user id • GID - group id • terminal: tty, pts, etc. serial terminals - /dev/tty. S{0 -x} virtual terminal - /dev/tty{1 -x} network connected terminals (ex. telnet) - /dev/pts/x graphical terminals in X window environment - /dev/pts/x Commands for gathering information: • id • whoami • tty ORAFACT

Gathering System Info Who else is logged into the system? • users • who

Gathering System Info Who else is logged into the system? • users • who • w • finger What type of system is this? • uname -a • free What is the system's network name • hostname • ifconfig ORAFACT

Getting Help with man & info It may seem cryptic, but at least it's

Getting Help with man & info It may seem cryptic, but at least it's well-documented • man [section] name man sections useful switches • info created by the GNU project meant as a "superior" replacement for man uses HTML like navigation with links if info pages exist, they usually provide better documentation than the corresponding man page use pinfo to view pages ORAFACT

MANPATH, whatis and apropos MANPATH defines search path for the man command can be

MANPATH, whatis and apropos MANPATH defines search path for the man command can be set three ways: • -M switch to the man command • MANPATH environment variable • defined in man configuration file (/etc/man. config ) Search through man pages for matches: • man -f, (whatis) • man -k, (apropos) ORAFACT

Help from Commands and Documentation command --help, -h /usr/share/doc/packagename-version Linux Documentation Project - LDP

Help from Commands and Documentation command --help, -h /usr/share/doc/packagename-version Linux Documentation Project - LDP Shipped or online distribution documentation Online help: • web sites • FAQs, Howtos, mini-Howtos • newsgroups • mailing lists ORAFACT