DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Security

FreeBSD Security Securing FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 27th May 2009
Dr_Death_UAE's Avatar
Dr_Death_UAE Dr_Death_UAE is offline
BSD Daemon
 
Join Date: Jul 2008
Posts: 9
Thanked 0 Times in 0 Posts
Default chroot jail FreeBSD "su: who are you?"

Hello, i create chroot jail every thing fine but when i try to login with the jailed user with su i got:
Quote:
su: who are you?
from the logs:

Quote:
May 27 15:33:28 h4x0r sudo: r0x : TTY=ttyp0 ; PWD=/ ; USER=root ; COMMAND=/usr/sbin/chroot /home/jail /usr/bin/su - r0x
from visudo:
Quote:
r0x ALL=NOPASSWD: /usr/sbin/chroot, /usr/bin/su - r0x
from "/home/jail/etc/passwd":
Quote:
r0x:*:1003:1003:User &:/home/r0x:/usr/local/bin/bash
from "/etc/passwd":
Quote:
r0x:*:1003:1003:User &:/home/jail/home/r0x:/bin/chroot-shell
the "chroot-shell" include:
Quote:
#!/usr/bin/env sh
/usr/local/bin/sudo /usr/sbin/chroot /home/jail /usr/bin/su - $USER "$@"
i use the same methods with linux systems it work fine, i use pwd_mkdb to update the master.passwd on the jail:
Quote:
pwd_mkdb -d /home/jail/etc/ /home/jail/etc/master.passwd
but still the same. i read that i need to use rssh as the shell instead of bash shell.
__________________
Theory is when you know all and nothing works.
Practice is when all works and nobody knows why.
In this case we have put together theory and practice: nothing works... and nobody knows why!
(Albert Einstein)
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Opera Port - conflicting pkgs in "make install" IronForge OpenBSD Packages and Ports 5 29th October 2009 05:10 AM
Fixed "xinit" after _7 _8, "how" here in case anyones' "X" breaks... using "nvidia" jb_daefo Guides 0 5th October 2009 09:31 PM
"Thanks" and "Edit Tags". diw Feedback and Suggestions 2 29th March 2009 12:06 AM
"free" command/perl script for freebsd unixdude FreeBSD General 0 17th November 2008 09:23 PM
FreeBSD and freeze sur "select country" mjj FreeBSD Installation and Upgrading 7 18th June 2008 02:16 AM


All times are GMT. The time now is 12:31 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick