Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 05-21-2009, 03:13 PM   #1
Registered: May 2007
Posts: 114

Rep: Reputation: 15
"bad passwd file" when logging into Chroot Jail

Hello all.

I'm trying to recreate the installation of an existing FTP server set up with a Chroot Jail (download available here: , so we know which one I'm referring to). The original server is going to be replaced, and unfortunately the original server was set up before my time. Having set up SCP Only jails before, I figured this would be straight-forward.

I downloaded and extracted the chroot jail, and installed as instructed. When I followed the procedure for creating the user and the associated home dir in the jail, and attempted to log in, I get the following error:

jail: chrooted directory /home/jailtest is not configuredfor jail (bad passwd file); bailing out.
Here's the procedure to add the user:

Linux# /usr/sbin/adduser -g users -d /home/jail/home/jailtest -s /usr/local/bin/jail jailtest
Linux# passwd jailtest
Linux# /usr/local/bin/addjailuser /home/jail /home/jailtest /usr/local/bin/jail jailtest
So, on our existing system, jailed users' home dirs are located under /home/jail/home/<user>, and the chrooted binaries are located in /home/jail/bin. I've checked that all of the necessary binaries are there, and still I get this message when attempting to "su - jailtest". When I attempt to log in remotely using FTP, it won't accept my password. The above procedure to add the user is what we have been using for years to add new users to the jail, but on this new server it just refuses to work.

This has to be something small and simple I'm missing, but I've followed the install instructions to the tee (however short they are).

Has anyone using this jail seen this before?

Old 05-25-2009, 09:09 AM   #2
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES / FC/ OES / CentOS
Posts: 614

Rep: Reputation: 32
Don`t you need to sudo chroot ?
Old 10-05-2011, 09:56 AM   #3
Registered: May 2007
Posts: 114

Original Poster
Rep: Reputation: 15
Well, here we are over two years later and this issue still plagues me. The processes are the same as in the original post. Does anyone have any idea why this might be happening? It seems there are a few people several years ago who had this same issue but no clear solution that applied to my setup was found.

Old 10-17-2011, 01:52 AM   #4
Registered: Aug 2008
Posts: 66

Rep: Reputation: 18
Might below url will be helpful :


chroot, jail, linux, passwd

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
"bad interpreter : no such file or directory" when configure "flex" acer_peri Linux - Software 10 11-10-2010 01:19 AM
"Mount: wrong file system type, bad option, bad superblock" User Name. Linux - Newbie 9 09-03-2008 03:40 PM
Turn off "Bad password" forcing in passwd Rotwang Linux - General 1 05-02-2006 08:55 AM
Problem with "Jail Chroot Project 1.9" Agento- Linux - General 2 01-19-2003 07:52 AM
chroot() - not able to "create" a jail --TOL-- Linux - Security 7 05-23-2002 11:29 AM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:30 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration