Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
~/.bashrc works for root, but not user
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
f.kater
Guru
Guru


Joined: 23 May 2002
Posts: 330
Location: Berlin

PostPosted: Fri Jul 05, 2002 5:33 pm    Post subject: Reply with quote

Thanks, su works now,

but the .bashrc thing ins't related to that, right? What might be the reason for that?
Thanks,
Felix
Back to top
View user's profile Send private message
kipper
Tux's lil' helper
Tux's lil' helper


Joined: 20 Apr 2002
Posts: 112

PostPosted: Sat Jul 06, 2002 12:31 pm    Post subject: Reply with quote

Who owns the copy of .bashrc in the user's directory? It might still belong to root and not the user.
If the file still belongs to root you can type
#chown user:group .bashrc

Cheers,
kipper
Back to top
View user's profile Send private message
f.kater
Guru
Guru


Joined: 23 May 2002
Posts: 330
Location: Berlin

PostPosted: Sat Jul 06, 2002 11:48 pm    Post subject: Reply with quote

Thank you! However, the file is owned by the user... So I don't know why it doesn't take effect...
Felix
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16090
Location: Colorado

PostPosted: Sun Jul 07, 2002 12:11 am    Post subject: Reply with quote

f.kater wrote:
Thank you! However, the file is owned by the user... So I don't know why it doesn't take effect...
Felix
Post the contents of the file... maybe there is something in it you can't do as a user.
Also, where did you get the file from? My root user doesn't have a .bashrc file, just
wondering.
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
klieber
Administrator
Administrator


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Sun Jul 07, 2002 12:52 pm    Post subject: Reply with quote

Also, make sure the user has read permissions on the file. (It should, but worth a check)

--kurt
_________________
The problem with political jokes is that they get elected
Back to top
View user's profile Send private message
f.kater
Guru
Guru


Joined: 23 May 2002
Posts: 330
Location: Berlin

PostPosted: Sun Jul 07, 2002 4:05 pm    Post subject: Reply with quote

Ok, here's the code of my users .bashrc

Code:
alias ls="ls -F"
export LANG="de_DE@euro"
export PS1="\w\\$ "


This file works in /root/ but not in /home/userme/. The user has the rights to read, write, execute it.
Thank you for your help!!
Felix
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16090
Location: Colorado

PostPosted: Sun Jul 07, 2002 4:17 pm    Post subject: Reply with quote

klieber wrote:
Also, make sure the user has read permissions on the file. (It should, but worth a check)

--kurt
What does ls -al ~/.bashrc output?
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
f.kater
Guru
Guru


Joined: 23 May 2002
Posts: 330
Location: Berlin

PostPosted: Sun Jul 07, 2002 6:02 pm    Post subject: Reply with quote

ls -al ~/.bashrc says

Code:

-rwxrwxrwx 1 userc users [...] .bashrc


(I ch'mod'ed it this way for testing reasons...)
Felix
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16090
Location: Colorado

PostPosted: Sun Jul 07, 2002 6:42 pm    Post subject: Re: can't su Reply with quote

f.kater wrote:
Why does my ~/.bashrc work for root but when copied to the user's home doesn't?
Since noone else has asked... What isn't working? The alias, the export LANG, or export PS1?
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
f.kater
Guru
Guru


Joined: 23 May 2002
Posts: 330
Location: Berlin

PostPosted: Mon Jul 08, 2002 5:18 pm    Post subject: Reply with quote

As you may expect: ;-)
Non of it...

Felix

(Sorry for the delay. Somehow I could not enter the gentoo forums for some time...)
Back to top
View user's profile Send private message
Damasz
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2002
Posts: 91
Location: Groningen, the Netherlands

PostPosted: Mon Jul 08, 2002 5:31 pm    Post subject: Reply with quote

First, check if your user has the /bin/bash shell in the /etc/passwd file

If not, change the line to look something like this:
user:x:1000:100:User Name:/home/user:/bin/bash

Next, check if the following line:
[ -f ~/.bashrc ] && . ~/.bashrc
is in your .bash_profile

Then it should all work!
Back to top
View user's profile Send private message
f.kater
Guru
Guru


Joined: 23 May 2002
Posts: 330
Location: Berlin

PostPosted: Mon Jul 08, 2002 5:47 pm    Post subject: Reply with quote

Hi Damasz,

that worked!
After I've added :\bin\bash to the line with my user name in /etc/passwd I got the right things in my shell (according to ~/.bashrc). Till now I've got no idea why this worked - but I hope to figure it out once!
Thank you all!
Felix
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum