LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 10-23-2002, 06:31 PM   #16
peeples
Member
 
Registered: Sep 2002
Location: Wichita Falls, TX
Distribution: tried a lot of 'em, now using kubuntu
Posts: 180

Original Poster
Rep: Reputation: 30

Yeah, In fact, that's what I was getting when this started: "cannot execute /bin/sh: Permission Denied" (see first post). Then I changed the entry in passwd to /bin/bash, same result.

But I appreciate all suggestions.

Anyone else? I would hate to have to bomb the partition and start all over (sigh)..
 
Old 10-23-2002, 11:31 PM   #17
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
just a thought....

try doing "file /bin/bash" and see what that gives you. this is what I got:

bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), not stripped

I'm thinking that maybe you installed it wrong.

what does your /etc/fstab look like?

EDIT:

I just read through again... I didn't realize that it works o.k. for root.... you probably installed it fine.

just for kicks.... try doing "chown peebles /bin/bash"

Last edited by adam_boz; 10-23-2002 at 11:36 PM.
 
Old 10-24-2002, 02:18 AM   #18
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
Try:

chown root:bin /bin
 
Old 10-24-2002, 08:46 AM   #19
peeples
Member
 
Registered: Sep 2002
Location: Wichita Falls, TX
Distribution: tried a lot of 'em, now using kubuntu
Posts: 180

Original Poster
Rep: Reputation: 30
Adam: I'm at work right now. Will post fstab when I get home.

Moses: Correct me if I'm wrong here. If I change to "chown root:bin /bin" then the group of the directory bin will be the group bin. If I'm not a member of either root group or bin group, then I'm relying on the last 5 in the 755 permissions to be able to use the file, so changing the group shouldn't have any effect. But, I'm sure gonna try it because I'm getting desperate.

Oh, shit. I just thought of something. When I went into the passwd file to change from /bin/sh to /bin/bash, I noticed the UID of the account was 1000. I don't know why, but I thought it might be nice to have all the UID numbers for user accounts in LFS to match what they were in RedHat. So I changed the UID to 506. If there is another file that does the translation from UID to english, then THAT might be the problem! I wish I was at home so I could try changing it back to 1000. How about it Gerard, Adam, Moses, and MasterC? Could that be it? Let me know
 
Old 10-24-2002, 01:37 PM   #20
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
Yeah, sorry. It was late and I didn't fully read (thought I had) your posts.

Ideas:

The UID probably isn't the problem, since /etc/passwd is the only place
this is set.

This is probably secondary, but are you using vipw to edit your passwd
file (vigr to edit group, vipw -s to edit the shadow password file)? This
command checks whether the file is correct when you quit.

I see that you have this from mount:

rootfs on / type rootfs (rw)
/dev/root on / type ext2

What kernel are you running? The rootfs is 2.5.x stuff (development,
not released in 2.4.x). This could very well be the culprit.

How did you add your new users? LFS suggests the use of useradd,
I don't see why just doing it yourself would cause a problem (it never
has for me), but. . .
 
Old 10-24-2002, 03:10 PM   #21
peeples
Member
 
Registered: Sep 2002
Location: Wichita Falls, TX
Distribution: tried a lot of 'em, now using kubuntu
Posts: 180

Original Poster
Rep: Reputation: 30
Moses:

Nah, I just type

vi passwd

to edit the passwd file.


I'm pretty sure that the kernel is 2.4.19 (about 98% sure).

I used useradd to add a user.


denny
 
Old 10-24-2002, 06:34 PM   #22
peeples
Member
 
Registered: Sep 2002
Location: Wichita Falls, TX
Distribution: tried a lot of 'em, now using kubuntu
Posts: 180

Original Poster
Rep: Reputation: 30
PROBLEM SOLVED!!!

I booted into LFS, logged in as root. cd'd to / and did a ls -la

I remembered the book saying that all directories should be 755 by default, and then we changed two of them so diffeent values. Well, /dev, /mnt, /proc, and /opt weren't at 755. Once I did a chmod 755 on them, I was able to login as username.

One tiny problem, now that I'm able to login as peeples:

When I did a directory listing on /home/peeples instead of showing the owner and group name it shows the UID & GID . I logged out, logged back in as root, and it doesn't do that in the root account. What's up with that?

Thanks so much for your help guys!

denny
 
Old 10-24-2002, 08:03 PM   #23
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
I can only think of /proc doing something funny.... I think that was probably the source of your troubles ( better chance it was that than /mnt or /opt ).

I don't know... congradulations on getting your user access to bash though.
 
Old 10-24-2002, 09:16 PM   #24
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
Wow, I was really feeling bad for you, assuming you missed some vital step way back in part 1 of ch 5. Glad you got it fixed, and I agree with adam, I can't see anything in /mnt or /opt or even really /dev that would do something like that to you.

Glad you got it working.

Cool
 
Old 10-25-2002, 09:07 AM   #25
ccool
Member
 
Registered: Oct 2002
Location: Canada
Distribution: Slackware 10.1
Posts: 71

Rep: Reputation: 15
If you see te UID and the GID instead of your group name and user name as the owner of your /home/peeples directory, it is because you changed your UID and GID in /etc/group and /etc/passwd...

anyway, you can make everything work fine with the chown and chgrp command (just set it with the right names)
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
/bin/.: Permission denied aizkorri Programming 9 03-17-2010 02:33 PM
su: /bin/bash: Permission denied dwarf007 Linux - General 10 01-20-2006 05:32 PM
Problem Cannot execute /bin/bash: Permission denied xeo Linux - Software 2 10-13-2004 11:55 PM
Cannot execute /bin/bash: Permission denied Hegemon Linux - General 4 01-19-2004 05:13 AM
/bin/sh Permission Denied vi0lat0r Linux - Newbie 1 08-26-2003 08:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:15 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration