SUDOERS_TIMESTAMP(5) File Formats Manual SUDOERS_TIMESTAMP(5)

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

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

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

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

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

SUDO(5) File Formats Manual SUDO(5)

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

SUDOREPLAY(8) System Manager s Manual SUDOREPLAY(8)

Maintaining the NDS Database

Linux System Administration

The Connector Version 2.0 Microsoft Project to Atlassian JIRA Connectivity

Advanced Unix Concepts. Satyajit Rai

Software Release Notes for XSS AD/SQL version 5.1.3

SUDO_PLUGIN(5) File Formats Manual SUDO_PLUGIN(5)

Operational Reporting Web Viewer Installation and Users Guide

EMC ApplicationXtender Web Access.NET eroom Integration 6.0

SUDO_PLUGIN(5) File Formats Manual SUDO_PLUGIN(5)

The Connector. Version 1.2 Microsoft Project to Atlassian JIRA Connectivity. User Manual

Authorized Send User s Guide Version 4.0

Table 12.2 Information Elements of a File Directory

ZettaMirror Install Guide

17: Filesystem Examples: CD-ROM, MS-DOS, Unix

Access Manager 3.2 Service Pack 2 IR1 resolves several previous issues.

Credential Policy CHAPTER

EMC Unisphere for VMAX Database Storage Analyzer

Quick Start for Coders and Approvers

Operating system security models

Examples of Cisco APE Scenarios

Correspondent Pipeline Portals Job Aid

Best Practices Benchmarking Application

Software Release Notes for XSS AD/SQL version 5.1.0

AT&T Global Network Client for Mac User s Guide Version 1.7.3

Table of Contents. Submitting a New Pre-Closing Package Searching for a Loan Submitting Pre-Closing Ineligible Conditions...

User Commands ps ( 1 )

CS/CIS 249 SP18 - Intro to Information Security

High Performance Computing Lecture 11. Matthew Jacob Indian Institute of Science

Profiling tool. Prototype architecture. Prototype Architecture and components description

User Administration Vaultview Security

G54ADM Sample Exam Questions and Answers

This Readme describes the NetIQ Access Manager 3.1 SP5 release.

MULTI-FACTOR AUTHENTICATION SET-UP

PASSPORTAL PLUGIN DOCUMENTATION

RSA Authentication Manager 7.1 Help Desk Administrator s Guide

Lab Authentication, Authorization, and Accounting

ReACT New User Setup, Password Reset and Account Unlock Instructions

Linux Kernel PROCESS. Copyrighted to

Authorized Send User s Guide for imagerunner Machines Version 4.1

UNIX File System. UNIX File System. The UNIX file system has a hierarchical tree structure with the top in root.

Konica Minolta Embedded

DSS User Guide. End User Guide. - i -

Novell Sentinel Novell 1 Overview 1.1 Prerequisites

Auditing TPM Commands

Authorized Send User s Guide Version 3.5

An Introduction to Unix Power Tools

CSE/ISE 311: Systems Administra5on Access Control and Processes

Magik Backupsuite Installation & Configuration

Novell ZENworks Handheld Management

Bergmans Mechatronics LLC. LabSocket. User Guide. LabSocket-Basic System. (Evaluation Version) May Copyright 2014 Bergmans Mechatronics LLC

Accessing the Online Application

BPPM Patrol Agent Installation Steps on Linux and Automation Integration

Introduction to Linux

MULTI-FACTOR AUTHENTICATION SET-UP

AppScaler SSO Active Directory Guide

Processes. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

A Different Approach to High Availability

EMC Documentum Archive Services for SharePoint

EMC ApplicationXtender Web Access

FreeBSD Advanced Security Features

How to Install R2017b Updates

OmniAccess 3500 Nonstop Laptop Guardian Release 1.2 Administrator Release Notes

Regions OnePass USER GUIDE. It s time to expect more. Regions Bank Member FDIC Revised

This chapter provides information about managing end user directory information.

Manual Download. Please visit SUNIX website by searching keyword isafe or KEY-256UN1 for detail.

Unix, History

Exclusive Configuration Change Access and Access Session Locking

Design Overview of the FreeBSD Kernel CIS 657

TCG Storage Application Note: Encrypting Drives Compliant with Opal SSC

Design Overview of the FreeBSD Kernel. Organization of the Kernel. What Code is Machine Independent?

Week 5 Lesson 5 02/28/18

NETCONF Client GUI. Client Application Files APPENDIX

NetIQ SecureLogin 8.7 enhances the product capability and resolves several previous issues.

INSTALLING INSTALLING INSTALLING

Using ROS with RedHawk Linux on the NVIDIA Jetson TX2

Ryft REST API - Swagger.io

RCU. ò Walk through two system calls in some detail. ò Open and read. ò Too much code to cover all FS system calls. ò 3 Cases for a dentry:

VFS, Continued. Don Porter CSE 506

under attack Listing Deleted Files A SECURITY BREACH CAN INSPIRE

INTERNAL REPRESENTATION OF FILES:

NFS Design Goals. Network File System - NFS

CMP-3440 Database Systems

Greenville CSD Parent Guide to SchoolTool

Assure Self-Service Portal

Secure Held Print Jobs. Administrator's Guide

Parents and Children

Microsoft Compound Document File Format

Processes. Operating System CS 217. Supports virtual machines. Provides services: User Process. User Process. OS Kernel. Hardware

OPERATING SYSTEMS ASSIGNMENT 4 XV6 file system

Quest Enterprise Reporter 2.0 Report Manager USER GUIDE

Trusted Platform Module (TPM) Quick Reference Guide

Using Spectralink 84-Series Phones with Microsoft Lync Server 2010

Transcription:

NAME sudoers_timestamp - Sudoers Time Stamp Format DESCRIPTION The sudoers plugin uses per-user time stamp files for credential caching. Once a user has been authenticated, they may use sudo without a password for a short period of time (5 minutes unless overridden by the timestamp_timeout option). By default, sudoers uses a separate record for each terminal, which means that a user s login sessions are authenticated separately. The timestamp_type option can be used to select the type of time stamp record sudoers will use. A multi-record time stamp file format was introduced in sudo 1.8.10 that uses a single file per user. Previously, a separate file was used for each user and terminal combination unless tty-based time stamps were disabled. The new format is extensible and records of multiple types and versions may coexist within the same file. All records, regardless of type or version, begin with a 16-bit version number and a 16-bit record size. Time stamp records have the following structure: /* Time stamp entry types */ #define TS_GLOBAL 0x01 /* not restricted by tty or ppid */ #define TS_TTY 0x02 /* restricted by tty */ #define TS_PPID 0x03 /* restricted by ppid */ #define TS_LOCKEXCL 0x04 /* special lock record */ /* Time stamp flags */ #define TS_DISABLED 0x01 /* entry disabled */ #define TS_ANYUID 0x02 /* ignore uid, only valid in key */ struct timestamp_entry { unsigned short version; /* version number */ unsigned short size; /* entry size */ unsigned short type; /* TS_GLOBAL, TS_TTY, TS_PPID */ unsigned short flags; /* TS_DISABLED, TS_ANYUID */ uid_t auth_uid; /* uid to authenticate as */ pid_t sid; /* session ID associated with tty/ppid */ struct timespec start_time; /* session/ppid start time */ struct timespec ts; /* time stamp (CLOCK_MONOTONIC) */ union { dev_t ttydev; /* tty device number */

pid_t ppid; /* parent pid */ } u; }; The timestamp_entry struct fields are as follows: version The version number of the timestamp_entry struct. New entries are created with a version number of 2. Records with different version numbers may coexist in the same file but are not interoperable. size type The size of the record in bytes. The record type, currently TS_GLOBAL, TS_TTY, or TS_PPID. flags Zero or more record flags which can be bit-wise ORed together. Supported flags are TS_DISABLED, for records disabled via sudo -k and TS_ANYUID, which is used only when matching records. auth_uid The user ID that was used for authentication. Depending on the value of the rootpw, runaspw and targetpw options, the user ID may be that of the invoking user, the root user, the default runas user or the target user. sid The ID of the user s terminal session, if present. The session ID is only used when matching records of type TS_TTY. start_time The start time of the session leader for records of type TS_TTY or of the parent process for records of type TS_PPID. The start_time is used to help prevent re-use of a time stamp record after a user has logged out. Not all systems support a method to easily retrieve a process s start time. The start_time field was added in sudoers version 1.8.22 for the second revision of the timestamp_entry struct. ts The actual time stamp. A monotonic time source (which does not move backward) is used if the system supports it. Where possible, sudoers uses a monotonic timer that increments even while the system is suspended. The value of ts is updated each time a command is run via sudo. If the difference between ts and the current time is less than the value of the timestamp_timeout option, no password is required.

u.ttydev The device number of the terminal associated with the session for records of type TS_TTY. u.ppid The ID of the parent process for records of type TS_PPID. LOCKING In sudoers versions 1.8.10 through 1.8.14, the entire time stamp file was locked for exclusive access when reading or writing to the file. Starting in sudoers 1.8.15, individual records are locked in the time stamp file instead of the entire file and the lock is held for a longer period of time. This scheme is described below. The first record in the time stamp file is of type TS_LOCKEXCL and is used as a lock record to prevent more than one sudo process from adding a new record at the same time. Once the desired time stamp record has been located or created (and locked), the TS_LOCKEXCL record is unlocked. The lock on the individual time stamp record, however, is held until authentication is complete. This allows sudoers to avoid prompting for a password multiple times when it is used more than once in a pipeline. Records of type TS_GLOBAL cannot be locked for a long period of time since doing so would interfere with other sudo processes. Instead, a separate lock record is used to prevent multiple sudo processes using the same terminal (or parent process ID) from from prompting for a password as the same time. HISTORY Originally, sudo used a single zero-length file per user and the file s modification time was used as the time stamp. Later versions of sudo added restrictions on the ownership of the time stamp files and directory as well as sanity checks on the time stamp itself. Notable changes were introduced in the following sudo versions: 1.4.0 Support for tty-based time stamp file was added by appending the terminal name to the time stamp file name. 1.6.2 The time stamp file was replaced by a per-user directory which contained any tty-based time stamp files. 1.6.3p2 The target user name was added to the time stamp file name when the targetpw option was set. 1.7.3 Information about the terminal device was stored in tty-based time stamp files for sanity checking. This included the terminal device numbers, inode number and, on systems where it was not updated when the device was written to, the inode change time. This helped prevent re-use of the

time stamp file after logout. 1.8.6p7 The terminal session ID was added to tty-based time stamp files to prevent re-use of the time stamp by the same user in a different terminal session. It also helped prevent re-use of the time stamp file on systems where the terminal device s inode change time was updated by writing. 1.8.10 A new, multi-record time stamp file format was introduced that uses a single file per user. The terminal device s change time was not included since most systems now update the change time after a write is performed as required by POSIX. 1.8.15 Individual records are locked in the time stamp file instead of the entire file and the lock is held until authentication is complete. 1.8.22 The start time of the terminal session leader or parent process is now stored in non-global time stamp records. This prevents re-use of the time stamp file after logout in most cases. Support was added for the kernel-based tty time stamps available in OpenBSD which do not use an on-disk time stamp file. SEE ALSO sudoers(5), sudo(8) AUTHORS Many people have worked on sudo over the years; this version consists of code written primarily by: Todd C. Miller See the CONTRIBUTORS file in the sudo distribution (https://www.sudo.ws/contributors.html) for an exhaustive list of people who have contributed to sudo. BUGS If you feel you have found a bug in sudo, please submit a bug report at https://bugzilla.sudo.ws/ SUPPORT Limited free support is available via the sudo-users mailing list, see https://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or search the archives.

DISCLAIMER sudo is provided "AS IS" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. See the LICENSE file distributed with sudo or https://www.sudo.ws/license.html for complete details.