User Login Problem: "command not found" unless root!
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
User Login Problem: "command not found" unless root!
Hey guys...i was just manually updating AbiWord to 2.2 as root, and when I logged out to go back in as my user it gave the following error:
# -bash: id: command not found
# -bash: fortune: command not found
So I deleted the user, copied all my important files (no hidden settings though), to the /home directory. Created a new user, and I got the same error. (the old files were still in /home). What's going on?! Thanks!
Can you see (maybe through your root account) if you still have the 'id' and 'fortune' binaries available?
On slack they should be located in:
Possibly your AbiWord upgrade hosed these files...?
Possibly some $PATH settings got muddled up in the upgrade also... the root user has (if I'm not mistaken), a separate $PATH than ordinary users, so if the regular $PATH settings got messed up and not your root $PATH, that could also explain the problem.
Possibly from root you could 'su - [username]' or just 'su [username]' to your regular account and then 'echo $PATH' to see if it is the PATH that is the problem.
- step into the directory where the binaries reside;
- check the files are marked executable for owner, users and others (this one is not necessary)
- try to execute them as a normal user: ./<binary>
if it doesn't work (even though the execute flag is set for 'ugo'), then my knowledge is not great enough to help you. You must search for the honorable Root's advice.
Oh, I recall this kind of files being owned by root and group games on some systems. Obviously, either your normal user must be in games or 'others' must have execute permission. Don't forget group adding only takes effect after logging out! (and back in)
i did that su business...no go. Also, I just put the "id" and "fortune" file in all of the /bin and /games directories. The "id" error went away and then it said it could not run /usr/share/games/fortunes/fortunes...so I went in and changed the group from root to user...still no go. Then I realized that the excecute wasn't checked...I did that...and the error message went away...HOWEVER, I still can't LOG IN!!!! This is rediculous...my bloody linux went even so far as to tease me by not showing errors and showing the Miscellaneous Quote that Slackware has inherently...then it would go back to the login screen!! Weak. Any help would be sweet! Thanks for all the effort guys!
Well, all that suggests to me that you did a
chmod -R/chown -R of sorts and majorly screwed
the box over ... as for the fortune and then taking
you back to the prompt ... maybe you did something
as silly as to add and 'exit' to the end of
/etc/profile or in your personal ~/.bashrc or
If you happened to "chmod -R" at some point in time, the easiest method most people are going to suggest to take care of the problem is to reinstall.
"chmod" stands for change mode, and the command exists to change permissions on files. The "-R" option (usually with any command), means to execute the command recursively throughout the directory tree...
So, depending on where you were when/if you executed a command like that, you could have set the permissions wrong in a single directory, an entire branch, or the entire filesystem.
You *could* use all that recursive power to put things right again, but you'd have to be pretty sure about what was put wrong in the first place, AND have a pretty thorough knowledge of what the correct permissions *should* be for all the files and directories on your system.
I'd backup anything you absolutely need to save, and reinstall. Otherwise (if you *did* set permissions wrong on a bunch of things), this is a problem that is going to follow you around for a long while, and I think you'd probably get more enjoyment out of using a correctly set up system than one that was set up all wacky-like.
After you get your system back up, you can download the Unix-Haters Handbook and read stories of people much more experienced than you or I hosing their systems with accidental commands issued as root.