Red Hat Bugzilla – Bug 111131
a space after the shell in /etc/passwd causes the shell to fail
Last modified: 2016-06-07 18:44:56 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.6a)
Description of problem:
A space at the end of a line in /etc/passwd will cause that shell to fail.
This would obviously happen by accident; however it is not something
that vipw checks for on user accounts.
The error message obtained after setting a shell of "/bin/bash " for a
su: /bin/bash : No such file or directory
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.use vipw to enter a space after a shell in /etc/passwd
2. su - to the user, whose shell has been altered
3. The result is su: /bin/bash : No such file or directory
Actual Results: The user no longer has a valid shell.
Expected Results: An extra space would be ignored or vipw could at
least check the termination of the lines for a space.
Ignoring it would be a bug. Assigning for possibly checking that there
vipw doesn't do any checking. This gives the administrator the maximum
flexibility when editing the password file. This also makes the
administrator responsible for the information they enter. :)
This is pretty much a "don't do that" situation.