su (Unix)
Page Module:Infobox/styles.css has no content.
| su | |
|---|---|
| Lua error in package.lua at line 80: module 'Module:InfoboxImage/data' not found. | |
| [[Programmer|Original authorTemplate:Pluralize from text]] | Page Template:Plainlist/styles.css has no content. |
| [[Programmer|DeveloperTemplate:Pluralize from text]] | AT&T Bell Laboratories |
| Initial release | November 3, 1971 |
| Operating system | Unix and Unix-like |
| Type | Command |
| Website | Script error: No such module "WikidataIB". |
Script error: No such module "Check for conflicting parameters".
The Unix command Page Template:Mono/styles.css has no content.su, which stands for "substitute user"[1][2] (or historically "superuser"[3][4]), is used by a computer user to execute commands with the privileges of another user account. When executed it invokes a shell without changing the current working directory or the user environment.
When the command is used without specifying the new user id as a command line argument, it defaults to using the superuser account (user id 0) of the system.
History
The command Page Template:Mono/styles.css has no content.su, including the Unix permissions system and the setuid system call, was part of Version 1 Unix. Encrypted passwords appeared in Version 3.[5] The command is available as a separate package for Microsoft Windows as part of the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities.[6]
Usage
When run from the command line, su asks for the target user's password, and if authenticated, grants the operator access to that account and the files and directories that account is permitted to access.
john@localhost:~$ su jane
Password:
jane@localhost:/home/john$ exit
logout
john@localhost:~$
When used with a hyphen (Page Template:Mono/styles.css has no content.su -) it can be used to start a login shell. In this mode users can assume the user environment of the target user.
john@localhost:~$ su - jane
Password:
jane@localhost:~$
The command sudo is related, and executes a command as another user but observes a set of constraints about which users can execute which commands as which other users (generally in a configuration file named Page Template:Mono/styles.css has no content./etc/sudoers, best editable by the command Page Template:Mono/styles.css has no content.visudo). Unlike Page Template:Mono/styles.css has no content.su, Page Template:Mono/styles.css has no content.sudo authenticates users against their own password rather than that of the target user (to allow the delegation of specific commands to specific users on specific hosts without sharing passwords among them and while mitigating the risk of any unattended terminals).
Some Unix-like systems implement the user group wheel, and only allow members to become root with Page Template:Mono/styles.css has no content.su.[7] This may or may not mitigate these security concerns, since an intruder might first simply break into one of those accounts. GNU Page Template:Mono/styles.css has no content.su, however, does not support the group wheel for philosophical reasons. Richard Stallman argues that because the group would prevent users from utilizing root passwords leaked to them, the group would allow existing admins to ride roughshod over ordinary users.[8]
See also
Further reading
- Page Module:Citation/CS1/styles.css has no content."From Novice to Master, and Back Again". D-Mac's Stuff. 2013-01-14. Retrieved 2022-08-10.
References
Page Template:Reflist/styles.css has no content.
- ^ Page Module:Citation/CS1/styles.css has no content."su(1) - Linux manual page". April 2, 2021.
Page Template:Mono/styles.css has no content.su - run a command with substitute user and group ID
- ^ Page Module:Citation/CS1/styles.css has no content."Unix Programmer's Manual, Seventh Edition, Volume 1" (PDF). January 1, 1979. p. 174. Archived (PDF) from the original on Jan 20, 2022.
Page Template:Mono/styles.css has no content.su - substitute user id temporarily
- ^ Page Module:Citation/CS1/styles.css has no content."Unix Programmer's Manual" (PDF). November 3, 1971. p. 17. Archived (PDF) from the original on March 17, 2022.
Page Template:Mono/styles.css has no content.su -- become privileged user... su allows one to become the super-user.
- ^ Page Module:Citation/CS1/styles.css has no content."Unix Programmer's Manual - Table of Contents" (PDF). November 3, 1971. Archived (PDF) from the original on March 17, 2022.
Page Template:Mono/styles.css has no content.su: become super-user
- ^ Page Module:Citation/CS1/styles.css has no content.McIlroy, M. D. (1987). A Research Unix reader: offticles annotated excerpts from the Programmer's Manual, 1971–1986 (PDF) (Technical report). CSTR. Bell Labs. 139.
- ^ Page Module:Citation/CS1/styles.css has no content."Native Win32 ports of some GNU utilities". unxutils.sourceforge.net.
- ^ Page Module:Citation/CS1/styles.css has no content.Levi, Bozidar (2002). UNIX Administration: A Comprehensive Sourcebook for Effective Systems and Network Management. CRC Press. pp. 207. ISBN 0-8493-1351-1.
- ^ Page Module:Citation/CS1/styles.css has no content."Why GNU su does not support the 'wheel' group". Archived from the original on June 21, 2021. Retrieved May 30, 2022.
External links
- su – manual pages from GNU coreutils.
- Template:Man
- Template:Man
- Template:Man
- The su command – by The Linux Information Project (LINFO) (Script error: No such module "webarchive".)
Lua error in package.lua at line 80: module 'Module:Navbox/configuration' not found.