LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 05-25-2007, 07:50 AM   #1
mobilemonkey
Member
 
Registered: May 2007
Distribution: slackware 11
Posts: 81

Rep: Reputation: 15
2 bash related questions


hello,
my first and most immediate problem is when i try and log into the root account i get the funny little message but no prompt, then the system hangs for about 30 seconds and kicks me back to the login prompt (im positive i am entering the correct login info for root). however i can log in to a normal user account. some other useful information my be that i have been editing the '~.xinitrc' file.

my second problem is with that normal user account. i have created '~.bashrc' and '~.bash_profile' in the home folder and added commands to them. however, when i log into the account, it seems it is still reading the global '/etc/profile' (i have tested this by changing the user prompt line of the '/etc/profile'). again, i have been editing the '.xinitrc' file (for this account), which i actually transfered over from the root accounts home folder, but i have given everyone RWX permissions to the file.

as you can see im in a bit of a mess, any help is appreciated.

Last edited by mobilemonkey; 05-25-2007 at 07:55 AM.
 
Old 05-25-2007, 07:58 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

1) What 'funny little message' are you getting?

2) /etc/profile is 'always' read, creating a ~/.bashrc and/or ~/.bashr_profile are there to create/change some local (private for that user) settings. See man bash (the INVOCATION part) for details.
 
Old 05-25-2007, 08:49 AM   #3
mobilemonkey
Member
 
Registered: May 2007
Distribution: slackware 11
Posts: 81

Original Poster
Rep: Reputation: 15
the messages are right after logging in, alot of them are quotes by famous people, id like to be able to switch this off too

i have a line in my '~.bash_profile' ('source ~.bashrc') which then (should) execute all the commands in the .bashrc file, which includes a custom prompt string command, but it doesnt seem to work, although i have had this working in the past
 
Old 05-25-2007, 08:53 AM   #4
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
I assumed that he meant the fortune message, which would indicate that he did successfully log in, the system just failed to give him a usable prompt.

I have always used .bash_profile under Slackware, never .bashrc. You might want to try just using bash_profile to load your user-specific settings. As for the xinitrc file, that shouldn't have anything to do with the current problems you are having since obviously that is a component of X. It shouldn't even be read when you are logging into the console.
 
Old 05-25-2007, 01:19 PM   #5
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Dunno how to fix whatever has been messed up, but to uninstall fortune, 'removepkg' the bsd-games package.
 
Old 05-25-2007, 02:17 PM   #6
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,211

Rep: Reputation: 293Reputation: 293Reputation: 293
Quote:
Originally Posted by mobilemonkey
i have a line in my '~.bash_profile' ('source ~.bashrc')
Don't know if it's a typo but you should have 'source ~/.bashrc' or '. ~/.bashrc'
 
Old 05-25-2007, 02:28 PM   #7
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
If you don't want the fortune messages, just do:

chmod -x /etc/profile.d/bds-games-login-fortune.sh

'removepkg bsdgames' is a bit ott and not necessary.
 
Old 05-25-2007, 02:53 PM   #8
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Unless, of course, you don't play any of the BSD games, it which case you just save some space.
 
Old 05-25-2007, 03:09 PM   #9
mobilemonkey
Member
 
Registered: May 2007
Distribution: slackware 11
Posts: 81

Original Poster
Rep: Reputation: 15
thanks for your suggestions everyone

i *think* ive worked it out. when i log into the root account and type 'echo $SHELL' i get '/bin/bash'. when i log into a normal user account and type 'echo $SHELL' i get '/bin/sh', which indicates the shell is the BOURNE shell. and so may not look at the '.bash_profile' on login ??. how would i set the bash shell as the default shell for normal users?

Last edited by mobilemonkey; 05-25-2007 at 03:23 PM.
 
Old 05-25-2007, 06:36 PM   #10
sn9ke_eyes
Member
 
Registered: Feb 2003
Location: Texas
Distribution: slackware 11
Posts: 90

Rep: Reputation: 15
to modify an existing user you can use the command

usermod -s /bin/bash username

or edit /etc/passwd to make the change for users there

I'm not sure how to set it as the default when you are creating a user, but you can specify it with useradd just like usermod.
 
Old 05-25-2007, 07:28 PM   #11
mobilemonkey
Member
 
Registered: May 2007
Distribution: slackware 11
Posts: 81

Original Poster
Rep: Reputation: 15
sn9ke_eyes, i edited the '/etc/passwd' file and put '/bin/bash' at the end of the users line. now everytime i log in as that user i get bash as my default login shell, and subsequent shells, and now the commands in the '.bash_profile' and the '.bashrc' are being read and executed, so everything works. thanks again

Last edited by mobilemonkey; 05-25-2007 at 07:31 PM.
 
  


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
basic questions on hostname and domain name + related postfix questions Moebius Linux - Newbie 7 09-04-2007 12:50 PM
bash related question Menestrel Linux - Newbie 2 01-25-2005 11:03 AM
Bash scriptting related Menestrel Linux - Newbie 2 05-22-2004 08:22 PM
3 non-related questions Rognon Slackware 5 02-06-2004 05:45 PM
bash related question MattSmith Linux - General 1 01-20-2004 06:41 AM


All times are GMT -5. The time now is 02:31 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration