Su (Unix)

su
Original author(s)
Developer(s)AT&T Bell Laboratories
Initial releaseNovember 3, 1971; 53 years ago (1971-11-03)
Operating systemUnix and Unix-like
TypeCommand

The Unix command 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 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]

The su command was removed from GNU coreutils as of release 8.18 (2012-08-12)[7] and is currently included in the util-linux package.

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 (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 /etc/sudoers, best editable by the command visudo). Unlike su, 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 su.[8] This may or may not mitigate these security concerns, since an intruder might first simply break into one of those accounts. GNU 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.[9]

See also

Further reading

  • "From Novice to Master, and Back Again". D-Mac's Stuff. 2013-01-14. Retrieved 2022-08-10.

References

  1. ^ "su(1) - Linux manual page". April 2, 2021. su - run a command with substitute user and group ID
  2. ^ "Unix Programmer's Manual, Seventh Edition, Volume 1" (PDF). January 1, 1979. p. 174. Archived (PDF) from the original on Jan 20, 2022. su - substitute user id temporarily
  3. ^ "Unix Programmer's Manual" (PDF). November 3, 1971. p. 17. Archived (PDF) from the original on March 17, 2022. su -- become privileged user... su allows one to become the super-user.
  4. ^ "Unix Programmer's Manual - Table of Contents" (PDF). November 3, 1971. Archived (PDF) from the original on March 17, 2022. su: become super-user
  5. ^ 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.
  6. ^ "Native Win32 ports of some GNU utilities". unxutils.sourceforge.net.
  7. ^ "NEWS". GitHub. 17 September 2022.
  8. ^ Levi, Bozidar (2002). UNIX Administration: A Comprehensive Sourcebook for Effective Systems and Network Management. CRC Press. pp. 207. ISBN 0-8493-1351-1.
  9. ^ "Why GNU su does not support the 'wheel' group". Archived from the original on June 21, 2021. Retrieved May 30, 2022.

Read other articles:

Grand Prix Spanyol 2015 Lomba ke-5 dari 19 dalam Formula Satu musim 2015← Lomba sebelumnyaLomba berikutnya → Sirkuit Barcelona-Catalunya.Detail perlombaan[1][2]Tanggal 10 Mei 2015Nama resmi Formula 1 Gran Premio de España Pirelli 2015[1]Lokasi Sirkuit Barcelona-CatalunyaMontmeló, SpanyolSirkuit Fasilitas balapan permanenPanjang sirkuit 4.655 km (2.892 mi)Jarak tempuh 66 laps, 307.104 km (190.826 mi)Cuaca Cerah25 °C (7...

 

 

Lambang Eszterházy dari abad ke-14 hingga ke-15 Lambang Eszterházy dari tahun 1852 Esterházy (juga dieja Eszterházy, pengucapan bahasa Hungaria: [ˈɛstɛrhaːzi]) adalah keluarga bangsawan Hungaria yang bermula pada abad pertengahan.[1][2][3][4] Keluarga ini mulai bangkit pada masa kepemimpinan Graf Nikolaus Esterházy (1583–1645) dan anaknya, Pangeran Paul Esterházy (1635–1713). Semenjak abad ke-17, keluarga ini menjadi pemilik berbagai tanah da...

 

 

Kesalahan pengutipan: Tag <ref> tidak sah; referensi tanpa nama harus memiliki isiBeberapa atau seluruh referensi dari artikel ini mungkin tidak dapat dipercaya kebenarannya. Bantulah dengan memberikan referensi yang lebih baik atau dengan memeriksa apakah referensi telah memenuhi syarat sebagai referensi tepercaya. Referensi yang tidak benar dapat dihapus sewaktu-waktu. Pantai NglamborSuasana sore hari di Pantai NglamborNegara IndonesiaProvinsiDaerah Istimewa YogyakartaKotaGunungk...

Bagian dari seri tentangEmosi Afeksi Kemarahan Kecemasan Derita Jengkel Pengharapan Kegelisahan Ketakacuhan Kegairahan Kekaguman Kebosanan Kepercayaan Kejijikan Kepuasan Keberanian Keingintahuan Depresi Hasrat Keputus asaan Kekecewaan Kemuakan Ketidakpercayaan Ekstasi Kejengahan Empati Entusiasme Iri Euforia Ketakutan Frustasi Perasaan bersyukur Kenestapaan Rasa bersalah Kebahagiaan Kebencian Harapan Horor Permusuhan Penghinaan Minat Kecemburuan Kegembiraan Kesepian Cinta Nafsi Nafsu Kebiadab...

 

 

John-Laffnie de Jager Nazionalità  Sudafrica Altezza 193 cm Peso 82 kg Tennis Carriera Singolare1 Vittorie/sconfitte 0-3 Titoli vinti 0 Miglior ranking 313º (12 ottobre 1992) Risultati nei tornei del Grande Slam  Australian Open  Roland Garros  Wimbledon 1T (1992)  US Open Doppio1 Vittorie/sconfitte 246-258 Titoli vinti 7 Miglior ranking 11º (31 luglio 2000) Risultati nei tornei del Grande Slam  Australian Open SF (1993)  Roland Garros 2T (1993, 1998) &#...

 

 

Ingrandescomune Ingrandes – VedutaIl Municipio LocalizzazioneStato Francia Regione Nuova Aquitania Dipartimento Vienne ArrondissementChâtellerault CantoneChâtellerault-2 TerritorioCoordinate46°52′N 0°34′E / 46.866667°N 0.566667°E46.866667; 0.566667 (Ingrandes)Coordinate: 46°52′N 0°34′E / 46.866667°N 0.566667°E46.866667; 0.566667 (Ingrandes) Superficie35,3 km² Abitanti1 898[1] (2009) Densità53,77 ab./km²...

Kompol Robert SyarifLahirRobert Syarif(1934-12-23)23 Desember 1934Surabaya, Jawa Timur, Hindia BelandaMeninggal12 Januari 2006(2006-01-12) (umur 71)Bandung, Jawa Barat, IndonesiaMakamTMP Cikutra, Bandung, Jawa BaratPekerjaanAktorTahun aktif1969—2006 Kompol Robert Syarif (23 Desember 1934 – 12 Januari 2006) adalah pemeran Indonesia Kehidupan pribadi Selain sebagai aktor, ia juga berprofesi sebagai polisi. Pria Indonesia-Belanda ini memulai kariernya sebagai anggota...

 

 

Latin Catholic jurisdiction in the United States Diocese of MemphisDioecesis MemphitanaCathedral of the Immaculate ConceptionCoat of armsLocationCountryUnited StatesTerritoryWest TennesseeEcclesiastical provinceLouisvillePopulation- Catholics65,779 (4.5%)InformationDenominationCatholicSui iuris churchLatin ChurchRiteRoman RiteEstablishedJune 20, 1970CathedralCathedral of the Immaculate ConceptionCurrent leadershipPopeFrancisBishopMost Rev. David TalleyMetropolitan ArchbishopShelton ...

 

 

Bilateral relations of Denmark and Poland Bilateral relationsDenmark–Poland relations relations Denmark Poland Denmark–Poland relations refers to the bilateral relations between Denmark and Poland. Relations between the two countries date back to the Middle Ages, while modern diplomatic relations were established on 8 September 1919.[1] During the 20th century, relations were turbulent but amicable.[2] The two countries moreover maintained a maritime border dispute until 2...

Arif ArrymanLahir(1956-02-03)3 Februari 1956Bukittinggi, Sumatera Barat, IndonesiaMeninggal7 September 2010(2010-09-07) (umur 54)Mampang Prapatan, Jakarta SelatanKebangsaanIndonesiaAlmamater- Institut Teknologi Bandung- Universitas Sorbonne, Paris, Prancis- Universitas Paris - IX Dauphine, Paris, PrancisPekerjaanEkonomDikenal atasPenasihat Menko EkuinSuami/istriSativa Sutan Aswar DR. Ir. Arif Arryman M.Eng (3 Februari 1956 – 7 September 2010) adalah seorang ekonom Indone...

 

 

Painting, by Jan Matejko, of Polish magnates (1697–1795). For their names, please see image description [1]. A Polish lord's journey during reign of King August III, by Jan Chełmiński, 1880 Possessions of Polish magnates in 16th–17th centuries The magnates of Poland and Lithuania (Polish: magnateria) were an aristocracy of Polish-Lithuanian nobility (szlachta) that existed in the Crown of the Kingdom of Poland, in the Grand Duchy of Lithuania and, from the 1569 Union of Lublin, in the P...

 

 

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Human rights in Ethiopia – news · newspapers · books · scholar · JSTOR (September 2023) (Learn how and when to remove this message)This article contains weasel words: vague phrasing that often accompanies biased or unverifiable information. Such statements sho...

English novelist (1775–1861) Lady Charlotte BuryLady Charlotte Campbell by Tischbein, 1789.BornCharlotte Susan Maria Campbell(1775-01-28)28 January 1775London, EnglandDied1 April 1861(1861-04-01) (aged 86)London, EnglandNationalityEnglishOccupationNovelistNotable workDiary illustrative of the Times of George IV (1838)Spouses John Campbell ​ ​(m. 1796; died 1809)​ Edward John Bury ​ ​(m. 1818; died 183...

 

 

Italian cyclist Michele GazzoliGazzoli at the 2017 Paris–Roubaix EspoirsPersonal informationBorn (1999-03-04) 4 March 1999 (age 25)Ospitaletto, ItalyHeight1.80 m (5 ft 11 in)Weight76 kg (168 lb)Team informationCurrent teamAstana Qazaqstan TeamDisciplineRoadRoleRiderProfessional teams2018–2019Polartec–Kometa2020–2021Team Colpack–Ballan[1][2]2022Astana Qazaqstan Team[3]2023Astana Qazaqstan Development Team2024–Astana Qazaqst...

 

 

ناهويل غوزمان (بالإسبانية: Nahuel Guzmán)‏  معلومات شخصية الاسم الكامل ناهويل اجناسيو غوزمان الميلاد 10 فبراير 1986 (العمر 38 سنة)روساريو،  الأرجنتين الطول 1.92 م (6 قدم 3 1⁄2 بوصة) مركز اللعب حارس مرمى الجنسية الأرجنتين  معلومات النادي النادي الحالي نادي تغريز أونا...

Ice hockey championship 2023 IIHF Women's U18 World ChampionshipTournament detailsHost country SwedenVenue(s)1 (in 1 host city)Dates8–15 January 2023Teams8Final positionsChampions  Canada (7th title)Runner-up  SwedenThird place  United StatesFourth place FinlandTournament statisticsGames played21Goals scored130 (6.19 per game)Attendance11,604 (553 per game)Scoring leader(s) Nela Lopušanová (12 points)MVP Nela Lopu�...

 

 

此條目可参照英語維基百科相應條目来扩充。 (2023年6月29日)若您熟悉来源语言和主题,请协助参考外语维基百科扩充条目。请勿直接提交机械翻译,也不要翻译不可靠、低品质内容。依版权协议,译文需在编辑摘要注明来源,或于讨论页顶部标记{{Translated page}}标签。 AM-905识别信息 IUPAC命名法 (6aR,9R,10aR)-3-[(E)-hept-1-enyl]-9-(hydroxymethyl)-6,6-dimethyl-6a,7,8,9,10,10a-hexahydrobenzo[c]chromen-1-o...

 

 

Volleyball competition held in Czechoslovakia 1949 FIVB World ChampionshipTournament detailsHost nation CzechoslovakiaDates10–18 SeptemberTeams10Venue(s)1 (in 1 host city)Officially opened byKlement GottwaldChampions Soviet Union (1st title)FirstNext → The 1949 FIVB Men's World Championship was the first edition of the tournament, organised by the world's governing body, the FIVB. It was held from 10 to 18 September 1949 in Prague, Czechoslovakia. Teams Pool A Pool B P...

Pour les articles homonymes, voir Route 101. Route 101 Algonquin Blvd. Informations Gérée par MTO Longueur 475 kilomètres (295,2 mi)[1] Direction ouest-est En service ouverte au complet en 1967 [réf. nécessaire] - Localisation Villes Wawa, Timmins, Matheson Intersections Extrémité ouest R-17 à Wawa Intersections Route 547 au sud de Hawk Junction Route 651 dans le comté d'Algoma R-129 au sud de Chapleau R-144 au sud-ouest de Timmins Route 655 à Timmins Rou...

 

 

この記事には複数の問題があります。改善やノートページでの議論にご協力ください。 出典がまったく示されていないか不十分です。内容に関する文献や情報源が必要です。(2022年10月) 独立記事作成の目安を満たしていないおそれがあります。(2022年10月)出典検索?: 鹿児島県産業会館 – ニュース · 書籍 · スカラー · CiNii · J-STAGE · N...