Linux - General This 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. |
| 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. |
|
 |
|
12-20-2004, 02:43 PM
|
#1
|
|
Member
Registered: Dec 2004
Location: New York
Distribution: Slackware
Posts: 154
Rep:
|
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:
# Password:
# -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!
-Galen
|
|
|
|
12-20-2004, 02:57 PM
|
#2
|
|
Member
Registered: Nov 2003
Distribution: Slackware 10
Posts: 40
Rep:
|
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:
/usr/bin/id
/usr/games/fortune
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.
Last edited by pH*; 12-20-2004 at 03:04 PM.
|
|
|
|
12-20-2004, 03:19 PM
|
#3
|
|
Member
Registered: Dec 2004
Location: New York
Distribution: Slackware
Posts: 154
Original Poster
Rep:
|
The files are still there...and when I did su usrname and then echo $PATH it gave:
/usr/local/bin:/bin:/usr/bin
which looks normal. Any other ideas?
-Galen
|
|
|
|
12-20-2004, 03:28 PM
|
#4
|
|
LQ Newbie
Registered: Dec 2004
Location: Germany
Distribution: debian-unstable
Posts: 22
Rep:
|
Hello,
not sure if it will cut it, but:
- 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)
Regards,
Renato
|
|
|
|
12-20-2004, 03:36 PM
|
#5
|
|
Member
Registered: Dec 2004
Location: New York
Distribution: Slackware
Posts: 154
Original Poster
Rep:
|
Fortune was in group root; so I changed that to users. But ID was normal!!  (under group bin). Any other ideas?
-Galen
|
|
|
|
12-20-2004, 04:30 PM
|
#6
|
|
LQ Newbie
Registered: Dec 2004
Location: Germany
Distribution: debian-unstable
Posts: 22
Rep:
|
mmm... so, the output of ls -l is something of the kind:
frwx--x--x root root bla bla
and the output of groups is:
users bin audio ...
well, in the case above, it doesn't matter to which group the user belongs - the whole world (that is, every user in the machine) has exdecute rights on the file.
If, on the other hand, those bits aren't set, then it's no wonder you can't run it.
I do admit I'm puzzled; AbiWord isn't some obscure piece of software that would screw unrelated files like that. Something else must have come about..
|
|
|
|
12-20-2004, 05:26 PM
|
#7
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,902
|
Quote:
Originally posted by DreameR-X
The files are still there...and when I did su usrname and then echo $PATH it gave:
/usr/local/bin:/bin:/usr/bin
which looks normal. Any other ideas?
-Galen
|
Try
su - username
instead ... without the minus the user inherits
roots environment which proves nothing about
the users own setup...
Cheers,
Tink
|
|
|
|
12-20-2004, 08:19 PM
|
#8
|
|
Member
Registered: Dec 2004
Location: New York
Distribution: Slackware
Posts: 154
Original Poster
Rep:
|
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!
-Galen
|
|
|
|
12-20-2004, 08:29 PM
|
#9
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,902
|
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
~/.bash_profile
Cheers,
Tink
|
|
|
|
12-20-2004, 08:34 PM
|
#10
|
|
Member
Registered: Dec 2004
Location: New York
Distribution: Slackware
Posts: 154
Original Poster
Rep:
|
The funny thing is, niether root nor my original user had a .bashrc...only .bash_history. I saw that in Insyte's tutorial and wondere'd about it. How do I undo the chmod thing?
-Galen
|
|
|
|
12-20-2004, 09:00 PM
|
#11
|
|
Member
Registered: Nov 2003
Distribution: Slackware 10
Posts: 40
Rep:
|
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.

|
|
|
|
12-21-2004, 12:27 AM
|
#12
|
|
Member
Registered: Dec 2004
Location: New York
Distribution: Slackware
Posts: 154
Original Poster
Rep:
|
The problem is, I know for sure I didn't type that command. And a reinstall=8hrs. (to update everything) But, eh, if I MUST i must...but I'll still cling to hope until then! 
-Galen
|
|
|
|
12-21-2004, 01:05 AM
|
#13
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,902
|
There's a script by someone calling himself the linuxangle
who uses Slack's MANIFEST.gz to re-create permissions.
Have a google search
Cheers,
Tink
|
|
|
|
12-21-2004, 02:52 AM
|
#14
|
|
Member
Registered: Dec 2004
Location: New York
Distribution: Slackware
Posts: 154
Original Poster
Rep:
|
Will do! Cheers right back at ya!
-Galen
|
|
|
|
12-21-2004, 11:25 AM
|
#15
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,902
|
|
|
|
|
| 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 12:44 AM.
|
|
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
|
|