Hey there,
You'll probably want to change your line from:
useradd -d /home/klsmith03/public_html -m - g ftpuser -p test03 -s
/bin/ftp klsmith03
to:
useradd -d /home/klsmith03 -m - g ftpuser -s /bin/false klsmith03
Reason being is that -d is the user's home directory,
/home/klsmith03/public_html won't be created if /home/klsmith03 doesn't
exist. "-s" is the shell, /bin/ftp is not a shell, and honestly I
don't know what'd happen if you had that there. /bin/false or
/bin/nologin, depending on the linux distro is the way to go if you want
to create a user, without a shell. Also, don't specify -p for a
password, as it will create a plain text password. Another suggestion,
is that if you want "public_html" to be created on account creation, add
it to /etc/skel, the -m will add anything in /etc/skel to a newly
created account.
My suggestion for creating an FTP only user would be the following:
(add specific directories to /etc/skel for new accounts)
useradd -d /home/klsmith03 -m - g ftpuser -s /bin/false (or
/bin/nologin) klsmith03
passwd klsmith03 (enter password when prompted)
(set ftpserver permissions to lock user into the directory of choice,
if your ftpd supports it)
Hope that helps,
Tony Evans
Phoenix Wing Interactive
johnseth@phoenixwing.com
http://www.phoenixwing.com/
keith smith wrote:
> Hi Everyone.
>
> Still working on that VPS w/o a control panel.
>
> Got the FTPD server up and running.....
>
> Now I am trying to add a user, defining the directory & no shell.
>
> User : klsmith03
> Password : test03
>
> After much research I came up with the following command.
>
> useradd -d /home/klsmith03/public_html -m - g ftpuser -p test03 -s
> /bin/ftp klsmith03
>
> I get error : useradd cannot create directory /home/klsmith03/public_html
>
> I googled and found some others are having the same problem. The
> answer on every post was to add the -m argument. As you can see I
> have the -m argument in my command.
>
> I've moved the -m argument around but I still get the same error message.
>
> Any help much appreciated
> Keith
>
>
>
>
>
>
>
> */
> /*
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss