LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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

Reply
 
Search this Thread
Old 12-20-2004, 02:43 PM   #1
DreameR-X
Member
 
Registered: Dec 2004
Location: New York
Distribution: Slackware
Posts: 154

Rep: Reputation: 30
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
 
Old 12-20-2004, 02:57 PM   #2
pH*
Member
 
Registered: Nov 2003
Distribution: Slackware 10
Posts: 40

Rep: Reputation: 15
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.
 
Old 12-20-2004, 03:19 PM   #3
DreameR-X
Member
 
Registered: Dec 2004
Location: New York
Distribution: Slackware
Posts: 154

Original Poster
Rep: Reputation: 30
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
 
Old 12-20-2004, 03:28 PM   #4
rdrs
LQ Newbie
 
Registered: Dec 2004
Location: Germany
Distribution: debian-unstable
Posts: 22

Rep: Reputation: 15
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
 
Old 12-20-2004, 03:36 PM   #5
DreameR-X
Member
 
Registered: Dec 2004
Location: New York
Distribution: Slackware
Posts: 154

Original Poster
Rep: Reputation: 30
Fortune was in group root; so I changed that to users. But ID was normal!! (under group bin). Any other ideas?
-Galen
 
Old 12-20-2004, 04:30 PM   #6
rdrs
LQ Newbie
 
Registered: Dec 2004
Location: Germany
Distribution: debian-unstable
Posts: 22

Rep: Reputation: 15
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..
 
Old 12-20-2004, 05:26 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,962
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
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
 
Old 12-20-2004, 08:19 PM   #8
DreameR-X
Member
 
Registered: Dec 2004
Location: New York
Distribution: Slackware
Posts: 154

Original Poster
Rep: Reputation: 30
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
 
Old 12-20-2004, 08:29 PM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,962
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
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
 
Old 12-20-2004, 08:34 PM   #10
DreameR-X
Member
 
Registered: Dec 2004
Location: New York
Distribution: Slackware
Posts: 154

Original Poster
Rep: Reputation: 30
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
 
Old 12-20-2004, 09:00 PM   #11
pH*
Member
 
Registered: Nov 2003
Distribution: Slackware 10
Posts: 40

Rep: Reputation: 15
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.

 
Old 12-21-2004, 12:27 AM   #12
DreameR-X
Member
 
Registered: Dec 2004
Location: New York
Distribution: Slackware
Posts: 154

Original Poster
Rep: Reputation: 30
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
 
Old 12-21-2004, 01:05 AM   #13
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,962
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
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
 
Old 12-21-2004, 02:52 AM   #14
DreameR-X
Member
 
Registered: Dec 2004
Location: New York
Distribution: Slackware
Posts: 154

Original Poster
Rep: Reputation: 30
Will do! Cheers right back at ya!
-Galen
 
Old 12-21-2004, 11:25 AM   #15
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,962
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
In case you couldn't find it :)

http://homepages.paradise.net.nz/~cameronk/progs.html



Cheers,
Tink
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Postgresql error FATAL: user "root" does not exist" cgetty Ubuntu 4 06-21-2005 02:11 PM
problem using ifup and ifconfig "command not found" sicgixxer Linux - Networking 2 11-11-2004 09:39 PM
Tiny Sofa 2.0 - I thought "halt", "reboot" were only root command ?? sorcerer Linux - Distributions 1 08-21-2004 03:28 PM
Two problem about "using pam to limit user login" coolend Linux - General 3 06-04-2004 01:11 PM
Newbie problem: Starting YAST gives me "-bash: yast: command not found". cattleya Linux - Software 9 11-20-2003 11:18 AM


All times are GMT -5. The time now is 01:26 PM.

Main Menu
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