LinuxQuestions.org
Social Bookmarking all things Linux and Open Source
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Tags used in this thread
Popular LQ Tags , , , ,

Reply
 
Thread Tools
Old 05-21-2009, 04:13 PM   #1
ddenton
Member
 
Registered: May 2007
Posts: 87
Thanked: 0
"bad passwd file" when logging into Chroot Jail


[Log in to get rid of this advertisement]
Hello all.

I'm trying to recreate the installation of an existing FTP server set up with a Chroot Jail (download available here: http://sourceforge.net/projects/jail , 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:

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

Code:
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?

Thanks!
ddenton is offline  
Tag This Post , , , ,
Reply With Quote
Old 05-25-2009, 10:09 AM   #2
saavik
Member
 
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES9,10 / FC8 / FC9
Posts: 527
Thanked: 1
Don`t you need to sudo chroot ?
saavik is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


All times are GMT -5. The time now is 01:52 AM.

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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration