Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-25-2007, 06:50 AM
|
#1
|
|
Member
Registered: May 2007
Distribution: slackware 11
Posts: 81
Rep:
|
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 06:55 AM.
|
|
|
|
05-25-2007, 06:58 AM
|
#2
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,711
|
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.
|
|
|
|
05-25-2007, 07:49 AM
|
#3
|
|
Member
Registered: May 2007
Distribution: slackware 11
Posts: 81
Original Poster
Rep:
|
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 
|
|
|
|
05-25-2007, 07:53 AM
|
#4
|
|
Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,817
|
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.
|
|
|
|
05-25-2007, 12:19 PM
|
#5
|
|
Guru
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,623
|
Dunno how to fix whatever has been messed up, but to uninstall fortune, 'removepkg' the bsd-games package.
|
|
|
|
05-25-2007, 01:17 PM
|
#6
|
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,081
|
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'
|
|
|
|
05-25-2007, 01:28 PM
|
#7
|
|
Member
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Rep:
|
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.
|
|
|
|
05-25-2007, 01:53 PM
|
#8
|
|
Guru
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,623
|
Unless, of course, you don't play any of the BSD games, it which case you just save some space.
|
|
|
|
05-25-2007, 02:09 PM
|
#9
|
|
Member
Registered: May 2007
Distribution: slackware 11
Posts: 81
Original Poster
Rep:
|
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 02:23 PM.
|
|
|
|
05-25-2007, 05:36 PM
|
#10
|
|
Member
Registered: Feb 2003
Location: Texas
Distribution: slackware 11
Posts: 90
Rep:
|
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.
|
|
|
|
05-25-2007, 06:28 PM
|
#11
|
|
Member
Registered: May 2007
Distribution: slackware 11
Posts: 81
Original Poster
Rep:
|
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 06:31 PM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:21 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|