Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi...i get the above error when i try to login as root...which as you can imagine is really not very good!!
my .bash_profile is also not the same..it almost has nothing in it...about 3 lines..thats it.
ive chmod 755 for the .bash_profile and .bashrc files...and checked lib and bin and they r all ok... even the /bin/bash has 755 mode.
any ideas?
ok..i'm not sure exactly how to..
i checked PATH with echo...and it gave a long line of /sr/bin:/usr/sbin ...
within .bashrc..i dont know if there is a PATH..
could you gimme some more details.
As a normal user, try to determine where the binary is for bash with
Code:
which bash
That command will return the path to the version of bash that you use as a normal user.
Then, as root
Code:
echo $PATH
Check to see if this path includes the path to bash you found earlier. If it doesn't, your root's path is bad and you should add the path to your bash binary to your path.
the $PATH is probably bad. Try setting it correctly in .bashrc
I think the path should be set in /etc/profile or maybe in .bash_profile but not in .bashrc.
(bashrc is not read on login shells)
Quote:
if [ "`id -u`" -eq 0 ]; then
PATH="/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"
fi
i tried that..
when i put which bash...it said /bin/bash
so i added /bin: to the front of my PATH in the etc/profile file as well as the .bash_profile file.
Still not being allowed.
This may not fix your current problem, but you probably don't want a binary to be writable by anyone, not even root, since that allows the binary to become corrupt.
You'd probably be better off changing the permissions of /bin/bash to 555.
Also, what are the permissions on /bin, the directory?
yeah...theyre all executable by all and readable by all...
i think i just overly messed up..playing too much in root..
think ill just re-install.
thanks for you help. good stuff
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.