John Carelli, Instructor at Kutztown University

John Carelli, Instructor at Kutztown University
Slide Note
Embed
Share

John Carelli is an instructor at Kutztown University, with expertise in user information management, system accounts, user administration commands, and group management. The content includes details about adding new users, modifying user settings, system accounts, primary and secondary groups, and more. Explore the world of user management in a networked environment through the lens of John Carelli's expertise.

  • John Carelli
  • Kutztown University
  • User Management
  • System Accounts
  • Group Management

Uploaded on Apr 19, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. John Carelli,Instructor Kutztown University carelli@kutztown.edu 1

  2. /etc/passwd user info user ID, group ID, home dir, shell, /etc/shadow actual password (encrypted) NIS network information service (yellow pages) distribute sys info (user names ) across computers on a network NIS+ updated version from Sun (Oracle) eliminate duplication of config data across network YouTube Video LDAP Lightweight Directory Access Protocol industry standard protocol distribute information across an IP network (name, passwords, etc ) YouTube Video 2 CSC252: John Carelli Source: Dr. Lisa Frye

  3. Add A New User useradd [-u uid] [-o] [-g group] [-G group [, group, ] [-d home] [-m] [-k template] [-f inactive] [-r] [-p passwd] [-s shell] [-e expire] [-c comment] login Default settings useradd -D [-g group] [-b base] [-f inactive] [-e expire] login useradd D to see default settings 3 CSC252: John Carelli Source: Dr. Lisa Frye

  4. usermod [-u uid] [-o] [-g group] [-G group [, group, ] [-d home] [-m] [-l new_login] [-f inactive] [-r] [-p passwd] [-s shell] [-e expire] [-c comment] login -G option will add the user to additional/supplementary groups userdel [-r] login 4 CSC252: John Carelli Source: Dr. Lisa Frye

  5. Accounts Three types of accounts Root and System Accounts root daemon bin sys lp adm nobody (root account - superuser) (system server processes/files) (owns system executables and files) (for Distributed File Services, DFS) (printers) (basic system functions) (default for unprivileged operations) (more info here) 5 CSC252: John Carelli Source: Dr. Lisa Frye

  6. Primary group Secondary groups /etc/group - groups on system groups command get a listing user can change current group with newgrp groupadd [-g gid] group to add a new group (root) 6 CSC252: John Carelli Source: Dr. Lisa Frye

  7. root daemon sys tty bin adm lp mail uucp / nuucp nobody noaccess More info & descriptions can be found here: https://wiki.debian.org/SystemGroups 7 CSC252: John Carelli Source: Dr. Lisa Frye

  8. backup from one machine label all tapes grandfather / father / son 3 backup cycles (ex: daily, weekly, monthly) avoids propagating an error https://www.handybackup.net/grandfather-father-son-backup.shtml secure backup tapes keep tapes off-site backup appropriately always check restore procedure periodically develop a tape life cycle 8 CSC252: John Carelli Source: Dr. Lisa Frye

  9. activity on filesystem capacity of dump device length of dump window amount of redundancy number of tapes available how far back you must be able to recover 9 CSC252: John Carelli Source: Dr. Lisa Frye

  10. cpio packs data on tape more efficiently than tar skips bad spots on restore (tar dies) can span tapes ex: ls | cpio -oc > /dev/rmt/n dump / ufsdump (Solaris unix file system dump) full vs incremental (0-9) info saved in /etc/dumpdate ufsdump N [u] [s length] [d density] [f dump_file] files_to_dump (files or a mount point) Compare tar, cpio, dump Source: Dr. Lisa Frye 10 CSC252: John Carelli

  11. mt [-f tape_device] commands rew offl status fsf [count] command - rewind - offline (unload the tape) - output status info on tape unit - forward space count files (i.e. jump ahead) restore [i] [x file_to_restore] [f tape_device] 11 CSC252: John Carelli Source: Dr. Lisa Frye

  12. Linux Device Names (disks) The first floppy drive is named /dev/fd0 The second floppy drive is named /dev/fd1 The first hard disk detected is named /dev/sda The second hard disk detected is named /dev/sdb, and so on The first SCSI CD-ROM is named /dev/scd0, also known as /dev/sr0 The partitions on each disk are represented by appending a decimal number to the disk name: /dev/sda1 and /dev/sda2 represent the first and second partitions of the first SCSI disk drive in your system. 12 CSC252: John Carelli

  13. Record characteristics of a file system length of a disk block size and location of inode tables disk block map and usage information size of the cylinder groups other important parameters of the file system more info here: http://www.linfo.org/superblock 13 CSC252: John Carelli Source: Dr. Lisa Frye

  14. Disk Information Get information about available disks: df command Disk space usage df -aTh (more readable format) lsblk command useful info about block devices major/minor numbers, /dev name, mount point, lsusb command (for usb devices) 14 CSC252: John Carelli

  15. Physically add drive Create entries in /dev mknod command can do this Partition and format the drive (next slides) Add entry to /etc/fstab(optional) contains info about how fs should be mounted 15 CSC252: John Carelli Source: Dr. Lisa Frye

  16. Disk Partitioning Must have superuser (root) access: fdisk l Lists information about all attached physical disks For a specific disk (i.e. /dev/sdb): fdisk l /dev/sdb To make changes to the disk, remove the l option fdisk /dev/sdb Interactive mode type m to get a menu of commands n command creates a new partition p subcommand adds a primary partition (default) Provide a partition number and sector info (defaults are fine) p command to view the partition table Note the device partition (probably, /dev/sdb1) w command to write the partition table and exit fdisk Source: Dr. Lisa Frye 16 CSC252: John Carelli

  17. Disk Formatting and Mounting Must have superuser (root) access: Formatting: mkfs.<type> partition format various types of file systems ext4 generally used in Linux Example: mkfs.ext4 /dev/sdb1 Common file systems: Windows: fat32/ntfs Unix: ext2/ext3/ext4 Mounting: Create a mount point (a directory for accessing the disk) mkdir /mnt/datadisk Mount the disk: mount /dev/sdb1 /mnt/datadisk Disk is now available at the given directory Note: may need to set permissions to make it accessible Source: Dr. Lisa Frye 17 CSC252: John Carelli

  18. Disk Mounting on Boot-up Must have superuser (root) access: Edit /etc/fstab Make a copy first! cp /etc/fstab /etc/fstab.bak Add the new entry to the file Column meanings are shown in a comment line above the first mount Example entry: /dev/sdb1 /mnt/datadisk ext4 defaults 0 0 Test the changes with mount a No output means it s OK Source: Dr. Lisa Frye 18 CSC252: John Carelli

  19. More on Mounting mount [-r] [device] <directory> uses /etc/fstab to get disk info -r for read only mount -t type [device] <directory> specify the type of device mount [-f filesystem_types] fake don t actually mount anything see what mount is trying to do, or add entries to /etc/mtab (for previously mounted devices) mountall called during boot process uses /etc/fstab to get disk info 19 CSC252: John Carelli Source: Dr. Lisa Frye

  20. umount <filesystem> umount /dev/sdb1 umountall 20 CSC252: John Carelli Source: Dr. Lisa Frye

  21. Who is using a file a directory or a socket? fuser [-u] [-k] <device> -u for user -k kills the process using the device! -v is verbose ex: fuser -u -m ~/. Checking/repairing a filesystem fsck [-p] [-n] [-y] [-F filesystem_type] [raw_device] 21 CSC252: John Carelli Source: Dr. Lisa Frye

  22. fixes damaged or inconsistent inodes unreferenced inodes large link counts unused data blocks not recorded in block maps data blocks listed as free but also used in a file incorrect summary info in superblock 22 CSC252: John Carelli Source: Dr. Lisa Frye

  23. Set up user quotas (limits on disk space usage) rq in /etc/fstab (normally rw) See /etc/fstab on acad create a quotas file in the affected filesystem edquota [-p prototype_user] <user> quota editor quota display quotas 23 CSC252: John Carelli Source: Dr. Lisa Frye

  24. Network File System - allows access over a network (looks like local storage) - runs on top of RPC protocol (Remote Procedure Call) daemons nfsd, mountd, statd, lockd, nfslogd start when system enters multiuser mode (run level 3) more info here /etc/exports - specifies exported file systems and hosts permitted to access them 24 CSC252: John Carelli Source: Dr. Lisa Frye

  25. Loading and initialization of kernel Device detection and configuration Creation of system processes Operator intervention (manual boot only) Execution of startup scripts (by init) Multiuser operation (init spawns getty process) 25 CSC252: John Carelli Source: Dr. Lisa Frye

  26. Also known as run levels 0 system is completely shut down 1 single-user mode (administration) 2 multi-user mode without NFS (networking) 3 full multi-user mode with networking 4 unused 5 full multi-user mode with networking and X11 (GUI) 6 reboot startup scripts defined in /etc/rc#.d commands in /etc/rc.local will execute on a runlevel change 26 CSC252: John Carelli Source: Dr. Lisa Frye

  27. setting the name of the computer setting the time zone checking the disks with fsck mounting the system s disks removing old files in /tmp configuring network interfaces starting up daemons and network services 27 CSC252: John Carelli Source: Dr. Lisa Frye

  28. logs shutdown kills nonessential processes executes sync waits for filesystem writes to complete halts the kernel 28 CSC252: John Carelli Source: Dr. Lisa Frye

  29. Shutdown/Restart commands shutdown [TIME] [message] halt reboot [-p] (-p is poweroff) init <run_level> generally run by kernel or, restart with the given run level runlevel command Will show the last 2 run levels 29 CSC252: John Carelli Source: Dr. Lisa Frye

  30. flushes cached superblocks to disk flushes modified inodes and cached data blocks 30 CSC252: John Carelli Source: Dr. Lisa Frye

  31. Updates to system files Correct errors or provide security fix patch applies a diff file to an original 31 CSC252: John Carelli Source: Dr. Lisa Frye

  32. CD Download source code Download package 32 CSC252: John Carelli Source: Dr. Lisa Frye

  33. yum apt-get 33 CSC252: John Carelli Source: Dr. Lisa Frye

  34. yum install <packageName> yum update [<packageName>] yum check-update yum clean all Install package and dependency packages Without package name,updates all installed packages Lists available updates for installed packages Removes all header files used for resolving dependencies and cached packages Lists all available packages Searches for word in package description, summary,packager,and name yum list available yum search <word> Groups of packages yum grouplist yum groupinfo Yumdownloader Configuration file:yum.conf 34 CSC252: John Carelli Source: Dr. Lisa Frye

  35. apt-get update Update local package list apt-get check Check status of local dependency tree apt-get install <package> apt-get remove <package> apt-get upgrade Upgrade all packages on the system that don t require any new packages apt-get dist-upgrade Upgrade all packages on the system and install any new packages necessary apt-cache search . List available packages 35 CSC252: John Carelli Source: Dr. Lisa Frye

  36. A background process that performs a specific function or system-related task 36 CSC252: John Carelli Source: Dr. Lisa Frye

  37. SYSLOGD - system logging Syslog standardized system for managing system log files programs write to the special file:/dev/log Common Log Files /var/log/messages /var/log/auth.log /var/log/kern.log /var/log/cron.log /var/log/maillog /var/log/httpd /var/log/boot.log /var/log/mysqld.log /var/log/utmp /var/log/wtmp /var/log/yum.log syslogd reads messages from this file consults configuration file: /etc/syslog.conf dispatches each message to appropriate destination Sys Admin should back up and maintain log files 37 CSC252: John Carelli Source: Dr. Lisa Frye

  38. SYSLOGD facility codes and names Facility code/name identifies the type of program logging the message (Wikipedia) 38 CSC252: John Carelli

  39. SYSLOGD Message Severity Levels The meaning of severity levels other than Emergency and Debug are relative to the application. (Wikipedia) 39 CSC252: John Carelli

  40. inetd / systemd inetd - super-server daemon that manages other daemons provides internet services listens for traffic on designated ports by (for example): ftp, pop3, telnet, Consults /etc/inetd.conf to determine which network ports to listen to Uses /etc/services or portmap daemon to map service names to port numbers Newer Linix distos use systemd 40 CSC252: John Carelli Source: Dr. Lisa Frye

  41. a daemon that manages port assignments for daemons that use RPC (Remote Procedure Call) Analogous to a function call across machines 41 CSC252: John Carelli Source: Dr. Lisa Frye

  42. Report on virtual memory usage Two arguments number of seconds between measuring and reporting values number of times to measure and report values Report First line will be average values since last system reboot Other lines represents current values man vmstat 42 CSC252: John Carelli Source: Dr. Lisa Frye

  43. Report on network connection information Common options netstat v # verbose netstat nt # tcp, numeric addresses netstat nl # listening sockets, numeric addresses netstat i # interfaces netstat rn # route, numeric addresses netstat s # summary statistics 43 CSC252: John Carelli Source: Dr. Lisa Frye

Related


More Related Content