bashrc wird über SSH nicht aufgerufen

DiveSurfer

Mitglied
Hallo
ich habe hier ein Debian Sarg mein problem ist das die bashrc eines Users (wenn er sich per SSH einloggt) nicht aufgerufen wird.
Die Datei ist verfügbar, die rechte stimmen auch,
hat einer eine Idee an was es liegen könnte?

lg Tobias
 
Hallo,
Code:
man bash

sagt dazu:
Code:
INVOCATION
       A login shell is one whose first character of argument zero is a -, or one started with the --login option.

       An  interactive  shell is one started without non-option arguments and without the -c option whose standard input and error
       are both connected to terminals (as determined by isatty(3)), or one started with  the  -i  option.   PS1  is  set  and  $-
       includes i if bash is interactive, allowing a shell script or a startup file to test this state.

       The  following paragraphs describe how bash executes its startup files.  If any of the files exist but cannot be read, bash
       reports an error.  Tildes are expanded in file names as described below under Tilde Expansion in the EXPANSION section.

       When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it  first  reads
       and  executes commands from the file /etc/profile, if that file exists.  After reading that file, it looks for ~/.bash_pro-
       file, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists  and  is
       readable.  The --noprofile option may be used when the shell is started to inhibit this behavior.

       When a login shell exits, bash reads and executes commands from the file ~/.bash_logout, if it exists.

       When  an interactive shell that is not a login shell is started, bash reads and executes commands from /etc/bash.bashrc and
       ~/.bashrc, if these files exist.  This may be inhibited by using the --norc option.  The --rcfile file  option  will  force
       bash to read and execute commands from file instead of /etc/bash.bashrc and ~/.bashrc.
Also entweder ~/.profile oder ~/.bash_profile verwenden...

Gruß

RedWing
 
Das geht leider auch nicht, denn in der bash_profile steht drin:

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

also sollte die bashrc aufgerufen werden.

Aber das Problem ist, dass selbst die bash_profile nicht aufgerufen wird.

lg tobias
 
Hi.

Und die Login-Shell ist auch wirklich bash? (bash verhält sich anders wenn unter dem Namen sh aufgerufen)

Wenn das der Fall ist, sollte wirklich zumindest eine (.bashrc bzw. .bash_profile) abgearbeitet werden. Schreib doch mal etwas Ausgabe-Code in die Dateien
Code:
echo "$*" >> /tmp/$USER.log

Gruß
 
die profile existiert nicht, ich habe nur die bash_profile

Dann bleibt noch sie in deinem Homeverzeichniss anzulegen...
Aso und die Dateien beginnen alle mit einem . also ~/.profile usw...
Und mit echos wie deepthroat schon sagte kannst dus testen.
Aber das ist wie schon erwähnt in der man page zur bash eigentlich alles ganz gut
beschrieben.
Und überprüf auch mal ob es wwirklich die bash ist.
Code:
echo $SHELL
sollte da Auskunft
geben...

Gruß

RedWing
 
Danke für die Hilfe, das problem ist gelöst, ich hatte in der passwd /bin/sh und nicht /bin/bash
stehen.
Mein Fehler

lg Tobias
 
@DiveSurfer: Sorry, ich kann es mir nicht verkneifen:

Was ist ein Debian Sarg, ein Synonym für toter GNU-Linux Rechner? :p
 
Zurück