Sudo: Switch User Do. Administrative Privileges Delegation Campus-Booster ID : **XXXXX. Copyright SUPINFO. All rights reserved

Similar documents
Access Control Lists. Beyond POSIX permissions Campus-Booster ID : **XXXXX. Copyright SUPINFO. All rights reserved

Processes. System tasks Campus-Booster ID : **XXXXX. Copyright SUPINFO. All rights reserved

Filesystem and common commands

Archives. Gather and compress Campus-Booster ID : **XXXXX. Copyright SUPINFO. All rights reserved

Your daily cup of CLI

CSE 265: System and Network Administration

User Management. lctseng

Linuxing In London - 19/10/2016. session 1: root, su or sudo? ALINA ŚWIĘTOCHOWSKA PRINCIPAL TECHNOLOGIST UNIX/LINUX

There are two tools with which you should be familiar: the program su, and more importantly, sudo. Here we see how to use them.

Computer Center, CS, NCTU

HANDS UP IF YOU DON T HAVE A VM OR IF YOU DON T REMEMBER YOUR PASSWORDS. Or something broke

SUDO(8) System Manager s Manual SUDO(8)

NETW 110 Lab 3 Post-Installation Configuration Page 1

SUDO(8) System Manager s Manual SUDO(8)

Configuring TACACS+ Finding Feature Information. Prerequisites for TACACS+

Interested in learning more? Global Information Assurance Certification Paper. Copyright SANS Institute Author Retains Full Rights

Visara Master Console Center. Software Installation P/N

Command-Line Interface (CLI) Basics

SUDO(5) File Formats Manual SUDO(5)

SUDO(8) System Manager s Manual SUDO(8)

Cross-Platform Management

Oracle 1Z Enterprise Linux System Administration. Download Full Version :

Configuring Security for the ML-Series Card

GNU/Linux: An Essential Guide for Students Undertaking BLOSSOM

Prerequisites for Controlling Switch Access with Terminal Access Controller Access Control System Plus (TACACS+)

TECH 4272 Operating Systems

5 Managing Logins. For Help. In this Chapter... Login Account Concepts, 5-2

SUDO.CONF(5) File Formats Manual SUDO.CONF(5)

Managing GSS User Accounts Through a TACACS+ Server

Managing Users, Managing Security

OBSERVEIT CLOUDTHREAT GUIDE

The kernel is the low-level software that manages hardware, multitasks programs, etc.

Linux Kung Fu. Ross Ventresca UBNetDef, Fall 2017

Configuring Authorization

Interested in learning more? Global Information Assurance Certification Paper. Copyright SANS Institute Author Retains Full Rights

Configuring the Management Interface and Security

One Identity Manager 8.0. Administration Guide for Connecting Unix-Based Target Systems

Working with Basic Linux. Daniel Balagué

Answers to Even- Numbered Exercises

Restrictions for Secure Copy Performance Improvement

Controlled Privilege Escalation in Linux/UNIX Environments

Managing GSS User Accounts Through a TACACS+ Server

Linux Command Line Interface. December 27, 2017

Linux OS Fundamentals for the SQL Admin. Anthony E. Nocentino

CSE 390a Lecture 4. Persistent shell settings; users/groups; permissions

INSE 6130 Operating System Security

Definition Center Installation for Linux

System Configuration as a Privilege

5. Easy Installation and Management

SUDOERS(5) File Formats Manual SUDOERS(5)

Information System Audit Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000)

Configuring Switch-Based Authentication

BPPM Patrol Agent Installation Steps on Linux and Automation Integration

Automatically Logging on a User at Linux System Boot time for Console Management

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1

Installing Applications in FreeBSD. wengyc

These instructions describe the system requirements and process for installing and initial configuration of jbase on Linux operating systems.

Outline. UNIX security ideas Users and groups File protection Setting temporary privileges. Examples. Permission bits Program language components

Automic Agent Deployment and Upgrade Toolkit. How-To Documentation

Operating system security

HP-UX System Administration Course Overview. Skills Gained. Who will the Course Benefit?

Managing Xen With Xen-Tools, Xen-Shell, And Argo

AAA Authorization and Authentication Cache

SUDOERS(5) File Formats Manual SUDOERS(5)

LINUX OS FUNDAMENTALS FOR THE SQL ADMIN

CSE 390a Lecture 4. Persistent shell settings; users/groups; permissions

Access Control. CMPSC Spring 2012 Introduction Computer and Network Security Professor Jaeger.

User Management. Lctseng, arr. by pschiu

VISUDO(8) System Manager s Manual VISUDO(8)

IBM Ported Tools for z/os Latest Status and New Features

Exercise Sheet 2. (Classifications of Operating Systems)

Lesson 3 Transcript: Part 2 of 2 Tools & Scripting

EMS Installation. Workstation Requirements CHAPTER. EMS Lite (Windows 95/98) EMS NT (Windows NT 4.0)

Crontab To Run Every 5 Minutes In Hp-ux

CPS221 Lecture: Operating System Protection

Linux Kung Fu. Stephen James UBNetDef, Spring 2017

Configuring Authorization

UBUNTU OPENSTACK. Ubuntu Server Administration Training

Oracle Hierarchical Storage Manager and StorageTek QFS Software

Review of Fundamentals

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1

Protection. CSE473 - Spring Professor Jaeger. CSE473 Operating Systems - Spring Professor Jaeger

CLI users are not listed on the Cisco Prime Collaboration User Management page.

Manual Shell Script Linux If File Exists Wildcard

Linux OS Fundamentals for the SQL Admin. Anthony E. Nocentino

9.2 Linux Essentials Exam Objectives

Programming Project # 2. cs155 Due 5/5/05, 11:59 pm Elizabeth Stinson (Some material from Priyank Patel)

Managing the Risk of Privileged Accounts and Passwords

client X11 Linux workstation

COMP 4/6262: Programming UNIX

Manual Shell Script Linux If File Exists And

TABLE OF CONTENTS OVERVIEW SYSTEM REQUIREMENTS GETTING STARTED - DEPLOYMENT GETTING STARTED - DEPLOYMENT ON A CLUSTER GETTING STARTED CONFIGURATION

Introduction to Unix May 24, 2008

Equitrac Office and Express 5.5 SUSE Linux iprint Server Guide

Download and install MySQL server 8 in Windows. Step1: Download windows installer

Case Studies in Access Control

PXM45 Backup Boot Procedures

Automic Agent Deployment and Upgrade Toolkit. How-To Documentation

INTRODUCTION TO LINUX

Equitrac Office/Express. SUSE Linux OES2 iprint Server Guide Equitrac Corporation

Transcription:

Sudo: Switch User Do Administrative Privileges Delegation Campus-Booster ID : **XXXXX www.supinfo.com Copyright SUPINFO. All rights reserved

Sudo: Switch User Do Your trainer Presenter s Name Title: **Enter title or job role. Accomplishments: **What makes the presenter qualified to present this course. Education: **List degrees if important. Publications: **Writings by the presenter on the subject of the course or presentation. Contact: **Campus-Booster ID: presenter@supinfo.com

Sudo: Switch User Do Course objectives By completing this course, you will: n Delegate privileges. Allow users to execute commands as root or another user. n Restricted delegation. Delegate only a command subset. n Password/Passwordless privilege granting. Control whether or not users will be prompted.

Sudo: Switch User Do Course topics Course s plan: n Unix privileges. Concept and limitations. n Using sudo. How to delegate privileges n Editing files as root: sudoedit. Wildcards and pitfalls.

Sudo: Switch User Do Unix privileges Concept and limitations

Unix privileges King and peasants Unix systems lacks granularity. n All or nothing model n Root user n Administrator n superuser n All-powerful n Regular user n (Very) limited n Helpless outside ~ n Rely on root

Unix privileges Peasants and Gentlefolks Power Users? n Service administrators n Need a subset of root privileges n Using su n Start/Stop daemon n Edit config files n Different physical users: Not a good idea. n Need to give root password away

Unix privileges Peasants and Gentlefolks Restricted su: sudo n Delegate only what s needed n Specific commands n Specific users n On specific hosts n Can log (almost) everything n Prompts for the sudoer password n Using sudo as a su is pointless

Unix privileges Stop-and-think Do you have any questions?

Unix privileges Stop-and-think Unix system have a privileged user group named Power Users. True False

Unix privileges Stop-and-think Unix system have a privileged user group named Power Users. True False

Sudo: Switch User Do Using sudo Delegating privileges

Using sudo Configuration Who s allowed to do what (and where). n Sudo config file n /etc/sudoers n Sensitive n Only writable as root n Never edit it directly n Use visudo n Checks syntax before overwriting n Uses $EDITOR

Using sudo Config file structure n Gobal format: login/group host = (can sudo as user) command(s) n Sarah can change the date: sarah ALL = (ALL) /bin/date n Bill can reboot without a password bill ALL = (ALL) NOPASSWD:/sbin/reboot n Members of the webadm group can control the service %webadmin ALL = (ALL) /etc/init.d/apache2 n Wheel members can execute all commands but su %wheel ALL = (ALL) ALL,!/bin/su

Using sudo Aliases Factoring elements. n Create lists of n Users, groups n Hosts, networks, n Binaries n Keywords: n User_Alias n Runas_Alias n Host_Alias n Cmnd_Alias

Using sudo Aliases Configuration Example: Cmnd_Alias BACKUPS = /usr/bin/tar, /usr/bin/rsync, \ /usr/bin/dump User_Alias BOPS = john, bill, sarah, %wheel BOPS ALL = (ALL) NOPASSWD: BACKUPS

Using sudo Sudo invocation Using sudo [user@linux ~]$ sudo [options] command Options Definitions -i -u user -l Interactive session: Open a shell as the selected identity. Run the command as user. List available (delegated) actions for the currently logged user.

Using sudo Stop-and-think Do you have any questions?

Using sudo Stop-and-think Sudo options: Match options and their definition. -u -i -l List av. actions Select user Open a shell

Using sudo Stop-and-think Sudo options: Match options and their definition. -u -i -l List av. actions Select user Open a shell

Sudo: Switch User Do Editing files as root: sudoedit Wildcard and pitfalls

Editing files as root: sudoedit Sudoedit Why not using $EDITOR? n Security n Spawn shell from editor n $EDITOR is a shell n n Sudoedit n Copy the file as root n Run $EDITOR as yourself n Overwrite original as root

Editing files as root: sudoedit Wildcards and Pitfalls n What do you think about this? %webadmins ALL = (ALL) NOPASSWD: sudoedit /etc/httpd/*

Editing files as root: sudoedit Wildcards and Pitfalls n Now consider this: [user@linux ~]$ sudoedit /etc/httpd/../shadow n Wildcards are potentially dangerous n Use with caution n Consider using ACL s to delegate rights over these files

Editing files as root: sudoedit Stop-and-think Do you have any questions?

Editing files as root: sudoedit Stop-and-think To allow users to edit a config file set, you will: Use sudoedit and a wildcard Use sudoedit, one command per file Use ACL s

Editing files as root: sudoedit Stop-and-think To allow users to edit a config file set, you will: Use sudoedit and a wildcard Use sudoedit, one command per file Use ACL s

Sudo: Switch User Do Course summary Sudoedit Unix privileges Wildcards Privileges delegation Using Aliases

Sudo: Switch User Do For more If you want to go into these subjects more deeply, Publications Courses Linux Technologies: Edge Computing Linux system administration Web sites www.supinfo.com www.labo-linux.com www.blackbeltfactory.com Conferences FOSDEM RMLL Solutions Linux

Congratulations You have successfully completed the SUPINFO course module n 07 Sudo: Switch User Do

Sudo: Switch User Do The end n Delegate only required privileges n Use sudo rather than sharing a single root account