Hi, I am trying to setup ftp and system users with no shell access. I have already added a shell /etc/ftponly in /etc/shells. /etc/ftponly is a file containing:
Quote:
#!/bin/sh
#
# ftponly shell
#
trap "/bin/echo Sorry; exit 0" 1 2 3 4 5 6 7 10 15
#
Admin=root@your-domain.com
#System=`/usr/ucb/hostname`@`/usr/bin/domainname`
#
/bin/echo
/bin/echo "********************************************************************"
/bin/echo " You are NOT allowed interactive access."
/bin/echo
/bin/echo " User accounts are restricted to ftp and web access."
/bin/echo
/bin/echo " Direct questions concerning this policy to $Admin."
/bin/echo "********************************************************************"
/bin/echo
#
# C'ya
#
exit 0
|
What I want to do now is creat users with the ftponly shell and home directories in /home/<username>. I tried useradd -s /etc/ftponly -d /home/<username> -m <username>. Which creates the home directory in the correct place but when I do an ls -al I get:
Quote:
drwxr-xr-x 2 schnap users 4096 2006-07-17 20:43 .
drwxr-xr-x 6 root root 4096 2006-07-17 20:35 ..
-rw-r--r-- 1 schnap users 220 2006-07-17 20:35 .bash_logout
-rw-r--r-- 1 schnap users 414 2006-07-17 20:35 .bash_profile
-rw-r--r-- 1 schnap users 2227 2006-07-17 20:35 .bashrc
|
So I also see these in FTP. How can I create the user and user dir without these files? Thanks.