Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

There is a "chsh" file in /etc/bash_completion.d . When I type "./chsh" in the directory /etc/bash_completion.d , nothing happens. Why?

If the "chsh" utility is disabled in Cygwin, are there ways to turn it on? If it's disabled, does it imply that all the utilities in /etc/bash_completion.d are disabled in Cygwin?

Update: It seems that the "chsh" utility isn't in any package of Cygwin. Is that right?

share|improve this question

migrated from stackoverflow.com Sep 1 '11 at 6:06

This question came from our site for professional and enthusiast programmers.

3 Answers 3

up vote 4 down vote accepted

The file in /etc/bash_completion.d is a library of command-line completion functions. It is not the chsh command.

share|improve this answer
    
Oh. Thanks. So the "chsh" command isn't available in Cygwin at all? –  alex_wang Aug 31 '11 at 5:48
    
Probably not; it doesn't make much sense in a non-UNIX environment. If it's anywhere, it'll be at /bin/chsh or /usr/bin/chsh. –  duskwuff Aug 31 '11 at 5:50
    
Thanks a lot. Then Cygwin only provides bash, right? There's no way to invoke another shell, e.g. tcsh? –  alex_wang Aug 31 '11 at 5:55
    
Certainly Cygwin supports shells other than bash. I don't think tcsh is installed by default, but it's easy enough to install it (it's under "shells" when you run setup.exe). I don't remember whether chsh is available. If not, you can run tcsh manually or edit /etc/passwd. –  Keith Thompson Aug 31 '11 at 6:22
1  
Yep, Cygwin also offers zsh, mksh (a Korn Shell), and a few more. –  ak2 Aug 31 '11 at 8:05

I suspect the reason for chsh not being available is that Cygwin doesn't have the setuid facility for allowing an executable to be run with the rights of its owner. This would be needed to allow chsh to change the shell entry in /etc/passwd when run by a limited user. Administrators can edit /etc/passwd directly anyway.

share|improve this answer

Well answered at http://cygwin.com/ml/cygwin-xfree/2010-02/msg00057.html

You need to edit /etc/passwd (with a text editor), change the last field in the line for your userid to /bin/tcsh

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.