Discussion:
chroot setup
Robert Spielmann
2006-12-06 15:37:47 UTC
Permalink
Hi,

I want a simple FTP setup with users from /etc/passwd who are supposed
to be locked inside their homedir. I tried several approaches from FAQs
and Google search results, but the only thing I managed to do was that
my user found himself inside an empty directory in Nirvana :-)

Can someone help me with this?

Thanks,
Robert
--
Robert Spielmann

Codecentric GmbH
http://www.codecentric.de
Bonato Agostino
2006-12-07 11:59:29 UTC
Permalink
Hi, Nirvana is good on saturday evening

On unix Solaris 9:

create a ftp structure

ftpconfig -d /mydir/ftp

add user only for ftp ( no shell )

*useradd -m -c "Guest FTP" -d /mydir/ftp/test --s /bin/true test*

modify /etc/shells and add /bin/true. Example:

*/bin/sh**
/bin/ksh**
/bin/bash
/bin/true*

set a password

passwd test

configure /etc/ftpd/ftpaccess and add to the default*

guestuser test **
guest-root /mydir/ftp*

modify the file <guest-root>/etc/passwd aka /mydir/ftp/etc/passwd with
only user, group and home copied from the system /etc/passwd

Example:

/etc/passwd*
test:x:1032:100:Guest FTP:/mydir/ftp/test:/bin/true

/mydir/ftp/etc/passwd
**
test:x:1032:100::/test:*

modify the permissions on the directory
*
chmod 700 /mydir/ftp/test****
chown /mydir/ftp/test test*

Now at ftp login you are in /test as root directory

bye
Post by Robert Spielmann
Hi,
I want a simple FTP setup with users from /etc/passwd who are supposed
to be locked inside their homedir. I tried several approaches from FAQs
and Google search results, but the only thing I managed to do was that
my user found himself inside an empty directory in Nirvana :-)
Can someone help me with this?
Thanks,
Robert
--
<http://www.sistemi-servizi.it/>

*Bonato Agostino*

*/Sistemi & Servizi Informatica S.r.l./*
/SUN System and Network Certified/
/HP System Administrator/
/Oracle DBA /

Tel. +39 0423 722324
Fax. +39 0423 498302
email: ***@sistemi-servizi.it <mailto:***@sistemi-servizi.it>
web: http://www.sistemi-servizi.it <web:%20http://www.sistemi-servizi.it>
Loading...