LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   define start-bash for user... (https://www.linuxquestions.org/questions/linux-software-2/define-start-bash-for-user-107718/)

pablovschby 10-23-2003 03:33 PM

define start-bash for user...
 
Hello

I don't know how, but anyhow I managed it to get the /bin/sh-bash as start-bash for a user on my router-system...

so...when he's logging on to this router... remote or local...he's always getting the bash /bin/sh and not the bash /bin/bash

is there a configfile, where i can define this first login-bash for a user??
thanks

pablovschby 10-23-2003 03:40 PM

i already tried:
Quote:

/usr/sbin/usermod -s /bin/bash pablo
...but it hasn't any effect...
please help...
thanks

hw-tph 10-23-2003 03:50 PM

Edit /etc/passwd and edit the pablo line. The last part (after the last ":") is the path to the shell to be used as default.

Håkan

pablovschby 10-23-2003 04:27 PM

Quote:

Edit /etc/passwd and edit the pablo line. The last part (after the last ":") is the path to the shell to be used as default.
I've done exactly what you was writing here...

still the same problem

pablovschby 10-23-2003 04:34 PM

when I'm logging in as pablo, I'm using this "bash":
  • -bash-2.05b$
...and I just want to get this setting back to this appearance,...as it is when I'm logging in as root:
  • root@router1 pablo]#^
.... I know... the syntax we spoke about...is set to:
Code:

/bin/bash
...at the line of "pablo" and at the line of "root", too...

so...I think,... it's just a problem ... of appearance...but where have I got to set which options..?

(it's the same bash)

pablovschby 10-23-2003 04:56 PM

and my alias'....that are defined in the file ~/.bashrc don't work either....
just as a hint

Caba 10-23-2003 05:22 PM

You need to add a value in your .bash_profile file for PS1 as that's where bash will look for your command prompt.

Something like this in your .bash_profile should do the trick:

PS1="[pablo@\h \W]$"

Edit >> Should work if you stick it in your .bashrc as well.

pablovschby 10-24-2003 02:36 AM

The entry I made that you was suggesting me didn't make any effect....

I would estimate, my .bashrc of this user isn't executed (and the .bashrc all other users as well).....cause the alias' don't work either...

Caba 10-24-2003 03:09 AM

well what do you have in your .bash_profile file as this is what is read first when you login?

pablovschby 10-24-2003 03:11 AM

these are my entries:
Quote:

# .bashrc

# User specific aliases and functions
PS1="[pablo@\h \W]$"
alias e=exit
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
export PS1='[\u@\h:\w ]\$'
export PATH=$PATH:/sbin
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
for the user.... but all the aliases.... don't work either
thanks

Caba 10-24-2003 03:17 AM

no, not your .bashrc file. Do you have a file called .bash_profile in your home dir?

If not create one that looks something like this:

# .bash_profile

# Load up your .bashrc file
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME=""

export USERNAME BASH_ENV PATH
. $HOME/.bashrc

pablovschby 10-24-2003 03:51 AM

I've copied exactly the same entry you've just posted in my /~/.bash_profile and it didn't have an effect....... still the same problem

maybe... right-access could be a reason...here the chmod's:
  • drwx------ 4 pablo pablo 4096 24. Okt 10:48 .
    drwxr-xr-x 3 root root 4096 23. Okt 21:48 ..
    -rw------- 1 pablo pablo 942 24. Okt 10:48 .bash_history
    -rw-r--r-- 1 pablo pablo 24 23. Okt 21:44 .bash_logout
    -rw-r--r-- 1 pablo pablo 191 23. Okt 21:44 .bash_prof_back
    -rw-r--r-- 1 root root 241 24. Okt 10:48 .bash_profile
    -rw-r--r-- 1 pablo pablo 260 24. Okt 09:31 .bashrc
...is that alright?

pablovschby 10-24-2003 04:56 AM

maybe it's helpful to say... that... aliases of the user "root" are working and his path's, too....
aliases of user "pablo" aren't working ... his path's don't work either....
...which are my possibilities to solve this problem'?

pablovschby 10-24-2003 09:27 AM

I've checked every detailed setting on my router...but everything was set right....isn't there a solution?

pablovschby 10-24-2003 09:47 AM

if you just can get me a "well-working" /~/.bashrc_profile - configfile...

....I would be hilarious...
thanks


All times are GMT -5. The time now is 10:36 AM.