Chsh

Chsh

chsh (an abbreviation of "change shell") is a command on Unix-like operating systems that is used to change a login shell. Users can either supply the pathname of the shell that they wish to change to on the command line, or supply no arguments, in which case chsh allows the user to change the shell interactively.cite book|title=Learning the Bash Shell: [Unix shell programming] |author=Cameron Newham and Bill Rosenblatt|pages=272|date=2005|publisher=O'Reilly|id=ISBN 0596009658]

chsh is a setuid program that modifies the /etc/passwd file, and only allows ordinary users to modify their own login shells. The superuser can modify the shells of other users, by supplying the name of the user whose shell is to be modified as a command-line argument. For security reasons, the shells that both ordinary users and the superuser can specify are limited by the contents of the /etc/shells file, with the pathname of the shell being required to be exactly as it appears in that file. (This security feature is alterable by re-compiling the source code for the command with a different configuration option, and thus is not necessarily enabled on all systems.) The superuser can, however, also modify the password file directly, setting any user's shell to any executable file on the system without reference to /etc/shells and without using chsh.cite book|title=A Practical Guide To Unix For Mac Os X Users|author=Mark G. Sobell and Peter Seebach|pages=448|date=2005|publisher=Prentice Hall PTR|id=ISBN 0131863339] [cite book|title=Essential System Administration|author=Æleen Frisch|pages=238|date=2002|publisher=O'Reilly|id=ISBN 0596003439]

On most systems, when chsh is invoked without the -s command-line option (to specify the name of the shell), it prompts the user to select one. On Mac OS X, if invoked without that option chsh displays an account editor allowing the user to change all of the features of their user account that they are permitted to change, the pathname of the shell being the name next to "Shell:".cite book|title=Unix|author=Deborah S. Ray and Eric J. Ray|pages=47|date=1998|publisher=Peachpit Press|id=ISBN 0201353954]

Depending from the system, chsh may or may not prompt the user for a password before changing the shell, or entering interactive mode. On some systems, use of chsh by ordinary users is disabled entirely.

On many Linux distributions, the chsh command is a PAM-aware application. As such, its behaviour can be tailored, using PAM configuration options, for individual users. For example, an auth directive that specifies the pam_listfile.so module can be used to deny chsh access to individual users, by specifying a file of the usernames to deny access to with the listfile= option to that module (along with the sense=deny option). [cite book|title=Linux System Security: The Administrator's Guide to Open Source Security Tools|author=Scott Mann and Ellen L. Mitchell|pages=101–102|date=2000|publisher=Prentice Hall PTR|id=ISBN 0130158070]

References

Further reading

* — some examples of invoking chsh with the -s and -l options

See also

* Comparison of command shells

External links

*


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • chsh — (an abbreviation of change shell ) is a command on Unix like operating systems that is used to change a login shell. Users can either supply the pathname of the shell that they wish to change to on the command line, or supply no arguments, in… …   Wikipedia

  • Chsh — (Abkürzung für Change Shell engl. Shell verändern) ist ein Befehl für BSD Unix Systeme, der zur Veränderung der Login Shell benutzt wird. Dabei kann der Benutzer entweder den Pfad zur gewünschten Shell eingeben oder den Befehl ohne Eingaben… …   Deutsch Wikipedia

  • CHSH inequality — In physics, the CHSH Bell test is an application of Bell s theorem, intended to distinguish between the entanglement hypothesis of quantum mechanics and local hidden variable theories. CHSH stands for John Clauser, Michael Horne, Abner Shimony… …   Wikipedia

  • chsh — Change Shell UNIX Kommando zum Aendern des vorgegebenen Kommandointerpreters http://www.desy.de/cgi bin/man cgichsh …   Acronyms

  • chsh — Change Shell UNIX Kommando zum Aendern des vorgegebenen Kommandointerpreters http://www.desy.de/cgi bin/man cgichsh …   Acronyms von A bis Z

  • One-Shot Entanglement-Enhanced Classical Communication — In the theory of quantum communication, it is well known that entanglement cannot increase the capacity of a classical communication channel in the sense of Shannon, that is, for an i.i.d. (independent and identically distributed) protocol.… …   Wikipedia

  • Teorema de Bell — El teorema de Bell o desigualdades de Bell se aplica en mecánica cuántica para cuantificar matemáticamente las implicaciones planteadas teóricamente en la paradoja de Einstein Podolsky Rosen y permitir así su demostración experimental. Debe su… …   Wikipedia Español

  • Bell's theorem — is a theorem that shows that the predictions of quantum mechanics (QM) are not intuitive, and touches upon fundamental philosophical issues that relate to modern physics. It is the most famous legacy of the late physicist John S. Bell. Bell s… …   Wikipedia

  • Bell test experiments — The Bell test experiments serve to investigate the validity of the entanglement effect in quantum mechanics by using some kind of Bell inequality. John Bell published the first inequality of this kind in his paper On the Einstein Podolsky Rosen… …   Wikipedia

  • Tsirelson's bound — Tsirelson s bound, also known as Tsirelson s inequality, or in another transliteration, Cirel son s inequality, arises in quantum mechanics, in discussion and experimental determination of whether local hidden variables are required for, or even… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”