# Can not log with a user different from root!

## iker

Hello,

I see that many people have problem doing a su root, but to me it is the opposite. I just can not log with a user different from root.

When i do su iker, it tells me "Can not execute /bin/bash"

When I try on a console it tells me No directory /home/iker"

Of course, /bin/bash is executable and /home/iker exists....

Any ideas?

                Iker

----------

## li1_getoo

mkdir /home/iker,its a good thing to chmod it

edit /etc/passwd, add /bin/bash in the iker's column

----------

## li1_getoo

grep iker /etc/passwd see if u have /bin/bash at the end of it , if not add it  :Smile:  sorry for dual post but i am using netscape 4.X

----------

## iker

I added the user Iker using either manual command line (useradd ) or the super useradd script. The /etc/passwd field on Iker is correct and the /home/iker is accessible (755) even /home is crossable (755).

This is really strange!

----------

## theBlackDragon

Being read/writable for a user is not enough for a home directory. 

/home/ikert should be owned by ikert, otherwiser you'll get that error(I had the same problem once.  :Embarassed:  )

----------

## li1_getoo

try     emerge superadduser

after u use it u see the whole process of adding a user  :Smile: 

----------

## iker

Guys,

I have used the superadduser or even did it myself.  Everything is correct (/home/iker belongs to iker etc...). The permissions are also good.

The problem does not come from here.

Any other idea? 

 :Rolling Eyes: 

----------

## lx

Just to make sure, you can login with the user in console? so using (a/min)getty or similar, so we should concentrate our efforts on su and not on /etc/passwd /home dir etc. can you find some info in /var/log (pam or something) ? 

Cya lX.

----------

## mooman

Okay, just throwing out ideas here...

Is that user a member of a valid group?   Is /etc/group okay?

Have you checked to see if there's something screwy in that user's .profile/.bashrc/etc stuff?  Ditto for the global ones?

Not that I expect any magic with these, just trying to explore other causes...

----------

## iker

Here is what I receive from PAM.

Session opened

Session closed!

Super....Sometimes it writes that it has problems with crwriter:

   "getgrname failed for cdwriter"

I have no cdwriter user, may be I should add one. But i think this will has no link with my problem.

The global behaviour has been described in the first message i wrote, concerning what happens when I do a su, and what happen when I try to log on a console!!!!

      Iker

----------

## theBlackDragon

I don't know what causes you problem but I'll describe how I did it (just in case  :Smile:  ).

Fist I made a home dir for my user.

I then added the user with the command:

```
adduser -G users, wheel -d /home/theblackdragon -s /bin/bash theblackdragon
```

I then used the chmod option of mc to change the ownership of my home dir.

I really hope you made some mistake in one of those steps, otherwise I fear you're in serious problems  :Confused: 

----------

## iker

I am in serious trouble then.

I told you that I tried by hand and with the superadduser script.

The problem comes from something else!

       Iker

PS:I tried with your command line and the rsult is the same:i can not log in!

----------

## li1_getoo

see who owns /home/iker

----------

## spacemonkey

I have exactly the same problem!  :Sad: 

----------

## BlackBart

 *iker wrote:*   

> Here is what I receive from PAM.
> 
> Session opened
> 
> Session closed!
> ...

 

i get the cdrwriter error too but I can log in just fine. have you done "chown iker.users /home/iker"?

----------

## pjp

Moved from Installing Gentoo.

----------

## spacemonkey

HA! look what i found!

Can't wait to get home and try this..  :Very Happy: 

----------

