LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-23-2003, 04:33 PM   #1
pablovschby
Member
 
Registered: Oct 2003
Posts: 153

Rep: Reputation: 30
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
 
Old 10-23-2003, 04:40 PM   #2
pablovschby
Member
 
Registered: Oct 2003
Posts: 153

Original Poster
Rep: Reputation: 30
i already tried:
Quote:
/usr/sbin/usermod -s /bin/bash pablo
...but it hasn't any effect...
please help...
thanks
 
Old 10-23-2003, 04:50 PM   #3
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
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
 
Old 10-23-2003, 05:27 PM   #4
pablovschby
Member
 
Registered: Oct 2003
Posts: 153

Original Poster
Rep: Reputation: 30
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
 
Old 10-23-2003, 05:34 PM   #5
pablovschby
Member
 
Registered: Oct 2003
Posts: 153

Original Poster
Rep: Reputation: 30
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)

Last edited by pablovschby; 10-23-2003 at 05:38 PM.
 
Old 10-23-2003, 05:56 PM   #6
pablovschby
Member
 
Registered: Oct 2003
Posts: 153

Original Poster
Rep: Reputation: 30
and my alias'....that are defined in the file ~/.bashrc don't work either....
just as a hint

Last edited by pablovschby; 10-23-2003 at 05:57 PM.
 
Old 10-23-2003, 06:22 PM   #7
Caba
LQ Newbie
 
Registered: Oct 2003
Location: UK
Distribution: Slackware
Posts: 17

Rep: Reputation: 0
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.

Last edited by Caba; 10-23-2003 at 06:28 PM.
 
Old 10-24-2003, 03:36 AM   #8
pablovschby
Member
 
Registered: Oct 2003
Posts: 153

Original Poster
Rep: Reputation: 30
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...
 
Old 10-24-2003, 04:09 AM   #9
Caba
LQ Newbie
 
Registered: Oct 2003
Location: UK
Distribution: Slackware
Posts: 17

Rep: Reputation: 0
well what do you have in your .bash_profile file as this is what is read first when you login?
 
Old 10-24-2003, 04:11 AM   #10
pablovschby
Member
 
Registered: Oct 2003
Posts: 153

Original Poster
Rep: Reputation: 30
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
 
Old 10-24-2003, 04:17 AM   #11
Caba
LQ Newbie
 
Registered: Oct 2003
Location: UK
Distribution: Slackware
Posts: 17

Rep: Reputation: 0
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
 
Old 10-24-2003, 04:51 AM   #12
pablovschby
Member
 
Registered: Oct 2003
Posts: 153

Original Poster
Rep: Reputation: 30
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?
 
Old 10-24-2003, 05:56 AM   #13
pablovschby
Member
 
Registered: Oct 2003
Posts: 153

Original Poster
Rep: Reputation: 30
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'?
 
Old 10-24-2003, 10:27 AM   #14
pablovschby
Member
 
Registered: Oct 2003
Posts: 153

Original Poster
Rep: Reputation: 30
I've checked every detailed setting on my router...but everything was set right....isn't there a solution?
 
Old 10-24-2003, 10:47 AM   #15
pablovschby
Member
 
Registered: Oct 2003
Posts: 153

Original Poster
Rep: Reputation: 30
if you just can get me a "well-working" /~/.bashrc_profile - configfile...

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to start new bash window woodland56 Debian 3 10-12-2005 03:14 AM
how to define user-defined commands in linux mannoulla Linux - General 1 04-05-2005 10:01 PM
Howto start bash Christoffer81 Linux - Newbie 5 06-13-2004 02:19 AM
How can I define permissions on a /home/user dir _before_ creating it with adduser skunkburner Linux - General 6 03-18-2004 04:42 PM
cannot start kdeas user ,can start icewm,fluxbox jackren Debian 1 03-01-2004 12:06 AM


All times are GMT -5. The time now is 01:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration