(X)ubuntu 8.04 LTS /etc/shells orphans question
This is an output of my "/etc/shells" file.
# /etc/shells: valid login shells
/bin/csh
/usr/bin/es
/usr/bin/ksh
/bin/ksh
/usr/bin/rc
/usr/bin/tcsh
/bin/tcsh
/usr/bin/esh
/usr/bin/screen
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/bin/false
However a search with "sudo apt-cache pkgnames <SHELL>" and "sudo dpkg -L <SHELL>", where SHELL is one of the aforementioned shells returned, that the following shells are not present on the system.
/bin/csh
/usr/bin/es
/usr/bin/ksh
/bin/ksh
/usr/bin/rc
/usr/bin/tcsh
/bin/tcsh
/usr/bin/esh
Is it safe to remove their entries in /etc/shells then? These shells arent used in "/etc/passwd" (login shells?).
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- A. Denton
- Solved:
- 2010-03-29
- Last query:
- 2010-03-29
- Last reply:
- 2010-03-23
You could backup the shells file, take the action you propose, then reboot.
If its no good and/or the system goes weird you can always copy the file back in live cd (if the system will not boot)
Its free to try, just make sure you can roll back if things go bad and you can do anything you like:
sudo cp /etc/shells /etc/shells_
Should do the backup for you :)
| A. Denton (aquina) said : | #2 |
actionparship thank you for your answer, but that's what I actually did not want to do.
I finally found the program /usr/sbin/
I'm quite sure that /etc/shells should be cleaned up whenever removing shells from the system. Correlation with «/etc/passwd» is advised since login-shells are defined here. Final note: I also removed «/usr/bin/screen» from the shells-file since that "shell" is not required for login. I also found online artiles mentioning that tclsh should not reside in the shells-file since it's not a fully qualified login shell.

