# Problem with pam_chroot.

## Tekara

I've set up jailed user account and everything actually works pretty good except for the one problem that is killing me. I want to give the user access to the Screen program so that he can log in via ssh and have programs run while not having to keep the terminal up. However when running screen from the jail I get this error:

```
-bash-3.00$ screen

getpwuid() can't identify your account!

```

Now, I actually believe this to be something I didn't set up with pam_chroot, but I just haven't a clue what to do! If anyone has an idea, I'm all ears!

----------

## Reikinio

Are /etc/passwd and /etc/group available inside the chrooted enviroment ?

Note: leave the lines for root and the user, erase the rest.

----------

## Tekara

They currently are not, however after my initial google search suggested that, I did try copying the files themselves over without any luck (later removed them since it did not work). Is there something I need to alter in pam_chroot for the chrooted environment to know that they are there?

----------

## Reikinio

I don't think your problem is related to pam_chroot, I think that this: 

```

-bash-3.00$ screen

getpwuid() can't identify your account!

```

happens because it can't read the 'passwd' and/or 'group' file(s), have you placed those files at /etc inside the chrooted enviroment and checked the perms(same as the real /) ?

You can strace 'screen', it should give you an idea on what's going on.

Regards,

----------

## Tekara

*slaps head* oh man, why didn't I think of that. Ran strace and about a quick read later realized it was because of a missing library.  So that fixes that problem. . . but looks like I ran into another now:

```
 -bash-3.00$ screen

Must be connected to a terminal.
```

Copied strace over for the jailed logon to use and this is what it turns out:

http://www.caer-ys.com/screenstrace.txt

googling aronud pulled this up:

http://www.gsyc.inf.uc3m.es/~assman/archived/jail/msg00102.html

Not so keen on his suggestions since it involves mounting proc inside the jail as well as other things, see if anyone has some input on this; perhaps there's a better way of going about that.

Thanks for all the help so far!

----------

## Tekara

quick bump.

----------

