Page MenuHomeSolus

/etc/shells is missing
Closed, DuplicatePublic

Description

There are programs relying on this file like Oh My Zsh installer:

~ $ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
grep: /etc/shells: No such file or directory
Zsh is not installed! Please install zsh first!
~ $ sudo eopkg it zsh
The following package(s) are already installed and are not going to be installed again:
zsh
No packages to install.

It should contain path to every installed shell.

Event Timeline

mati865 created this task.Dec 19 2017, 6:08 PM

Installed still doesn't work because it relies on this file.

Is there specific reasoning for not creating it when (almost?) all desktop distributions do it?

Man page: https://linux.die.net/man/5/shells

Justin added a subscriber: Justin.Dec 22 2017, 7:38 AM

Installed still doesn't work because it relies on this file.
Is there specific reasoning for not creating it when (almost?) all desktop distributions do it?
Man page: https://linux.die.net/man/5/shells

Package baselayout has file /usr/share/defaults/etc/shells
Solus is a stateless OS: https://clearlinux.org/features/stateless

In effect, ohmyzsh is incorrectly relying on an implementation detail of glibc (the location of the file) rather than using getusershell() C function
to validate whether a shell is known or not. It should neither know nor care about the shells file, nor should anyone ever directly execute an installation
script directly from the internet (piping curl to a command shell is extremely dangerous)

@Justin, @ikey thank you for detailed responses.

nor should anyone ever directly execute an installation script directly from the internet

Forgive my laziness but it was sane environment requiring root password to do something serious like mounting other partitions.

Confession: I do stuff like this too :P