1 / 18

Linux Admin Tasks

Linux Admin Tasks. Chapter 16. This Chapter. User and group config Backing up files System reports Keeping users informed Speeding up the system. User and Group Configuration. Adding a user through the command line useradd –g {group} –c “UsersFullName” UserName

luyu
Download Presentation

Linux Admin Tasks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linux Admin Tasks Chapter 16

  2. This Chapter • User and group config • Backing up files • System reports • Keeping users informed • Speeding up the system

  3. User and Group Configuration • Adding a user through the command line • useradd –g {group} –c “UsersFullName” UserName • useradd –g sales –c “Joe Javahead” Joe

  4. Adding a user through GUI • System-config-users

  5. Manipulating users accounts • Removing a user through command prompt • userdel –r UserName • userdel -r Joe • “-r” will remove all user files and his home directory • Adding a user group • groupadd –g {assigned group ID} GroupName • groupadd –g 3737 Sales • groupmod can be used to change group name

  6. Backing Up Files • Full vs. incremental • Medium • Tape • DVD • Swappable media • SAN / NAS

  7. Backup Utils • tar – tape archive • cpio – copy in / copy out

  8. tar • Tar is used to pack the entire contents of a directory or directories into a single file called a tarball which can then be backed up to tape, gzipped and saved, or transferred to another system • The most commonly used tar functions are: • c - create an archive • x - extract files from an archive • t - list the contents of an archive • v - verbose (output to screen) • f  filename - use the specified file • z - gzip/gunzip

  9. tar – cont’d • Back up the contents of the home directory for Joe (/home/Joe) in a tarball called Joe.tar on a floppy disk.Options: Create archive, verbose, use specified file name: mount /floppycd /hometar -cvf /floppy/Joe.tar Joe

  10. cpio • Similar to tar, but has a wider variety of archive formats • cpio {-o/-i} filenames device • cpio –o archive.gz;archive2.gz /dev/cdrom

  11. Scheduling Tasks • “at” command • Execute commands at a specified time and optional date. The commands are read from standard input or from a file. • at {time} {day/date} then specify job • at 15:30 wed [ENTER] • At>./cleanup • At> press ctrl +D to end process

  12. GUI Task Schedule • KCron is an application for scheduling programs to run in the background. It is a graphical user interface to cron, the UNIX system scheduler • When KCron starts you will see a summarized view of existing scheduled tasks and associated environment variables

  13. Kcron

  14. System Reports • You can use various utilities we have already covered to collect information about the system: who, finger, ls, ps, etc • Vmstat can be used to report on virtual memory status. • Top will report heaviest use processes • Sar (System Activity Report) give a snapshot of the systemresources( sysstat package)

  15. Communicating to users • Write • Utility allows you to communicate with a single user that is logged onto the local system. Users can use it to write back • Wall • Utility that allows the Admin to send a one-way communication to all logged in users • Wall the building is on fire

  16. Keeping the system humming • In the unlikely event of a loss of cabin pressure oxygen masks will drop form the compartments above. • Equally unlikely is a hung program on a Linux machine. When it does happen you can use the kill command to get rid of that program.

  17. Kill • Use top to find the process ID for the offending program • Use kill PID to stop the program • Kill 3014

  18. This Chapter • User and group config • Backing up files • System reports • Keeping users informed • Speeding up the system

More Related