chsh
Template:Short description Script error: No such module "For".
Page Module:Infobox/styles.css has no content.
| chsh | |
|---|---|
| [[Programmer|Original authorTemplate:Pluralize from text]] | Salvatore Valente |
| Operating system | Unix and Unix-like |
| Type | Command |
| Website | Script error: No such module "WikidataIB". |
Script error: No such module "Check for conflicting parameters".
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 Page Template:Mono/styles.css has no content.chsh allows the user to change the shell interactively.[1]
Usage
Page Template:Mono/styles.css has no content.chsh is a setuid program that modifies the Page Template:Mono/styles.css has no content./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 Page Template:Mono/styles.css has no content./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 Page Template:Mono/styles.css has no content./etc/shells and without using Page Template:Mono/styles.css has no content.chsh.[1][2][3]
On most systems, when Page Template:Mono/styles.css has no content.chsh is invoked without the Page Template:Mono/styles.css has no content.-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 the Page Template:Mono/styles.css has no content.-s option, Page Template:Mono/styles.css has no content.chsh displays a text file in the default editor (initially set to vim) 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:". When the user quits vim, the changes made there are transferred to the /etc/passwd file which only root can change directly.[2][4]
Using the Page Template:Mono/styles.css has no content.-s option (for example: % chsh -s /usr/local/bin/bash) greatly simplifies the task of changing shells.
Depending on the system, Page Template:Mono/styles.css has no content.chsh may or may not prompt the user for a password before changing the shell, or entering interactive mode. On some systems, use of Page Template:Mono/styles.css has no content.chsh by non-root users is disabled entirely by the sysadmin.[4]
On many Linux distributions, the Page Template:Mono/styles.css has no content.chsh command is a PAM-aware application. As such, its behaviour can be tailored, using PAM configuration options, for individual users. For example, an Page Template:Mono/styles.css has no content.auth directive that specifies the Page Template:Mono/styles.css has no content.pam_listfile.so module can be used to deny Page Template:Mono/styles.css has no content.chsh access to individual users, by specifying a file of the usernames to deny access to with the Page Template:Mono/styles.css has no content.listfile= option to that module (along with the Page Template:Mono/styles.css has no content.sense=deny option).[5]
Portability
POSIX does not describe utilities such as Page Template:Mono/styles.css has no content.chsh, which are used for modifying the user's entry in Page Template:Mono/styles.css has no content./etc/passwd. Most Unix-like systems provide Page Template:Mono/styles.css has no content.chsh.[6] SVr4-based systems provided a similar capability with passwd. Two of the three remaining systems (IBM AIX[7] and HP-UX[8]) provide Page Template:Mono/styles.css has no content.chsh in addition to Page Template:Mono/styles.css has no content.passwd -e. The exception is Solaris, where non-administrators are unable to change their shell unless a network name server such as NIS or NIS+ is installed.[9][10] The obsolete[11] SGI SVr4 system IRIX64 also lacked Page Template:Mono/styles.css has no content.chsh.
See also
References
Page Template:Reflist/styles.css has no content.
- ^ a b Page Module:Citation/CS1/styles.css has no content.Cameron Newham and Bill Rosenblatt (2005). Learning the Bash Shell: [Unix shell programming]. O'Reilly. pp. 272. ISBN 0596009658.
- ^ a b Page Module:Citation/CS1/styles.css has no content.Mark G. Sobell and Peter Seebach (2005). A Practical Guide To Unix For Mac Os X Users. Prentice Hall PTR. p. 448. ISBN 0131863339.
- ^ Page Module:Citation/CS1/styles.css has no content.Æleen Frisch (2002). Essential System Administration. O'Reilly. p. 238. ISBN 0596003439.
- ^ a b Page Module:Citation/CS1/styles.css has no content.Deborah S. Ray and Eric J. Ray (1998). Unix. Peachpit Press. pp. 47. ISBN 0201353954.
- ^ Page Module:Citation/CS1/styles.css has no content.Scott Mann and Ellen L. Mitchell (2000). Linux System Security: The Administrator's Guide to Open Source Security Tools. Prentice Hall PTR. pp. 101–102. ISBN 0130158070.
- ^ Page Module:Citation/CS1/styles.css has no content.Nelson Beebe (August 11, 2005). "chsh command availability".
- ^ Page Module:Citation/CS1/styles.css has no content."IBM Knowledge Center chsh command". IBM. Retrieved January 24, 2015.
- ^ Page Module:Citation/CS1/styles.css has no content."chsh(1)". Hewlett Packard. Archived from the original on January 28, 2015. Retrieved January 24, 2015.
- ^ Page Module:Citation/CS1/styles.css has no content.Peter Smulder (March 12, 2000), chsh on Solaris, LinuxForum
- ^ Page Module:Citation/CS1/styles.css has no content.Henry van Cleef (February 4, 2005). "User chsh shell change function needed for Solaris". LinuxForum.
- ^ Page Module:Citation/CS1/styles.css has no content."SGI - Services & Support: SGI Support of MIPS IRIX Products Continues to December 2013". Archived from the original on July 6, 2009. Retrieved January 24, 2015.
Further reading
- Page Module:Citation/CS1/styles.css has no content.Cynthia Gibas and Per Jambeck (2001). Developing Bioinformatics Computer Skills. O'Reilly. pp. 89–90. ISBN 1565926641. — some examples of invoking Page Template:Mono/styles.css has no content.chsh with the Page Template:Mono/styles.css has no content.-s and Page Template:Mono/styles.css has no content.-l options
External links
Page Module:Side box/styles.css has no content.Page Template:Sister project/styles.css has no content.
Lua error in package.lua at line 80: module 'Module:Navbox/configuration' not found.