Parameters for bash in /etc/passwd

Parameters for bash in /etc/passwd

Post by Rolf Hemmerlin » Mon, 02 Feb 1998 04:00:00

With my very-old Linux 1.2X, with /etc/passwd, I was able to say

node3:x:511:100:node3:/home/node3:/bin/bash --posix

With my new LINUX 2.0.32, *any* parameter behind bash is rejected if I
try to login by the message
"cannot execute/bin/bash --posix": No such file or directory

Especially, even a single space behind /bin/bash typed in by using EMACS
caused the same error message. The administration tool of S.U.S.E Linux
even did not allow me to enter a space behind the path of the login
shell (but there must be a space between the executable file and the
first parameter!)

It does not help to put this into an executable batch file
because this is rejected if I try to login by the message
"Cannot execute /bin/bash_posix: Exec format error"
The attributes are o.k., if I log in with the bash shell without
parameters, I may execute both bash --posix or bash_posix.

My system: S.U.S.E. Linux 5.1 of Nov 1997 (Linux 2.0.32),
shadow password system shadow.rpm is version 961025-6 from the S.U.S.E.
CD set.

Dont tell me about .profile or so, I need the command line parameter
--posix for use with non-VT100 terminals (else ls uses VT100 escape
sequences for the directory display) !!!! Neither the file
/etc/DIR_COLORS has no effect on that, nor the bash environment variable

Please answer to the newsgroups and to me *personally* by E-Mail, too,
in german or english language !

Any help ?

      /   /   /  Alone on the data highway...
    /       /    like on an allee in Hannover-Herrenhausen
  /   /   /      Rolf Hemmerling, Germany
/       /


1. Parameters for bash in /etc/passwd

It seems that the login program is trying to exec the shell... which makes
sense, unless the login shell is a script.  :-)

As a last resort, you could always write a simple C program whose sole purpose
is to run bash with the --posix argument... ie. exactly what you were trying
to do with the shell script, but with an 'exec-able' file.

Malcolm Chan (English), Zeng Qiangyong (Chinese)   _/      _/  _/_/_/
Student, Computer Science Department              _/_/  _/_/ _/
University of Auckland                           _/  _/  _/ _/

2. arpwhohas

3. Makefiles and libraries question

4. MBR problem

5. How to program Linux & Hardware port IO


7. Convert NIS passwd back to standard /etc/passwd & /etc/shadow

8. /etc/passwd & /etc/security/passwd

9. CDE vs. /etc/passwd, /etc/shadow and /etc/group

10. Parameters and parameter expansion in bash/ksh