sudo

From Infogalactic: the planetary knowledge core
(Redirected from Visudo)
Jump to: navigation, search

<templatestyles src="Module:Hatnote/styles.css"></templatestyles>

sudo
Developer(s) Todd C. Miller
Stable release sudo 1.8.15 / November 1, 2015; 8 years ago (2015-11-01)
Written in C
Operating system Unix-like
Type Privilege authorization
License ISC-style[1]
Website www.sudo.ws

sudo (/ˈsd/[2] or /ˈsd/[2][3]) is a program for Unix-like computer operating systems that allows users to run programs with the security privileges of another user, by default the superuser.[4] It originally stood for "superuser do"[5] as the older versions of sudo were designed to run commands only as the superuser. However, the later versions added support for running commands not only as the superuser but also as other (restricted) users, and thus it is also commonly expanded as "substitute user do".[6][7] Although the latter case reflects its current functionality more accurately, sudo is still often called "superuser do" since it is so often used for administrative tasks.

Unlike the related command su, users must supply their own password for authentication, rather than the password of the target user. After authentication, and if the configuration file, which is typically located at /etc/sudoers, permits the user access, the system invokes the requested command. The configuration file offers detailed access permissions, including enabling commands only from the invoking terminal; requiring a password per user or group; requiring re-entry of a password every time or never requiring a password at all for a particular command line. It can also be configured to permit passing arguments or multiple commands.

History

Robert Coggeshall and Cliff Spencer wrote the original subsystem around 1980 at the Department of Computer Science at SUNY/Buffalo.[8] As of 2007 the current version is under active development, maintained by OpenBSD developer Todd C. Miller and distributed under a ISC-style license.[8]

In November 2009 Thomas Claburn, in response to concerns that Microsoft had patented sudo,[9] characterized such suspicions as overblown.[10] The claims were narrowly framed to a particular GUI, rather than to the sudo concept.[11]

Design

Unlike the command su, users supply their personal password to sudo if necessary. After authentication, and if the configuration file permits the user access, the system invokes the requested command. By default the user's password can be retained through a grace period (15 minutes per pseudo terminal), allowing the user to execute several successive commands as the requested user without having to provide a password again.

sudo may be configured to log each command run. When a user attempts to invoke sudo without being listed in the configuration file, an exception indication is presented to the user indicating that the attempt has been recorded in the system log.[citation needed]

Configuration

The file /etc/sudoers may contain a list of users to execute a subset of commands while having the privileges of the root user or other specified user. The program may be configured to require a password or none at all.[12]

Impact

In some system distributions, sudo has largely supplanted the default use of a distinct superuser login for administrative tasks, most notably in some Linux distributions as well as Apple's Mac OS X.[13][14]

RBAC

In association with SELinux, sudo can be used to transition between roles in role-based access control (RBAC).[15]

Tools and similar programs

visudo is a command-line utility that allows editing the configuration file in a fail-safe manner. It prevents multiple simultaneous edits with locks and performs sanity and syntax checks.

The program runas provides similar functionality in Microsoft Windows, but it cannot pass current directories, environment variables or long command lines to the child. And while it supports running the child as another user, it does not support simple elevation. A true su and sudo for Windows that can pass all of that state information and start the child either elevated or as another user (or both) is included with Hamilton C shell.[16][17]

Graphical user interfaces exist for sudo, notably kdesudo, and gksudo. Other user interfaces are not directly built on sudo, but provide similar temporary privilege elevation for administrative purposes, such as User Account Control in Microsoft Windows and Mac OS X Authorization Services.[18]

See also

References

  1. Lua error in package.lua at line 80: module 'strict' not found.
  2. 2.0 2.1 Lua error in package.lua at line 80: module 'strict' not found.
  3. Lua error in package.lua at line 80: module 'strict' not found.
  4. Lua error in package.lua at line 80: module 'strict' not found.
  5. https://pthree.org/2009/12/31/the-meaning-of-su/
  6. https://wiki.archlinux.org/index.php/Sudo
  7. Haeder, A.; Schneiter, S. A..; Pessanha, B. G.; Stanger, J. LPI Linux Certification in a Nutshell. O'Reilly Media, 2010. p. 409. ISBN 978-0596804879.
  8. 8.0 8.1 Lua error in package.lua at line 80: module 'strict' not found.
  9. Lua error in package.lua at line 80: module 'strict' not found.
  10. Lua error in package.lua at line 80: module 'strict' not found.
  11. Lua error in package.lua at line 80: module 'strict' not found.
  12. Lua error in package.lua at line 80: module 'strict' not found.
  13. Lua error in package.lua at line 80: module 'strict' not found.
  14. Lua error in package.lua at line 80: module 'strict' not found.
  15. Lua error in package.lua at line 80: module 'strict' not found.
  16. Lua error in package.lua at line 80: module 'strict' not found.
  17. Lua error in package.lua at line 80: module 'strict' not found.
  18. Lua error in package.lua at line 80: module 'strict' not found.

External links