# pureFTPd virtual users

## midnite

Hi there,

to be straight forward, how can i start the virtual users function ?

i have read the official menu and i am following what it says, hope i didnt get its meaning wrong. but the virtual users are just simply cant login by a ftp software in another machine.

in details, i have created a system user in a non-root group and my (/etc/passwd) is as follow:

```
ftptest:x:1008:1001::/home/./:/bin/bash
```

this system user can connect to my ftp server with no problem.

then i use this to create a virtual user:

```
# pure-pw useradd virtualtest -u ftptest -d /home/student -m
```

and the content in (/etc/pureftpd.passwd) becomes :

```
virtualtest:$1$okyQokB0$lIYmS9sIVi90ZeoBxNCyz.:1008:1001::/home/student/./::::::::::::
```

then i turn the virtual user function on in (/etc/conf.d/pure-ftpd) :

```
## Authentication (others are 'pam', ...)##

## Further infos in the README file.

AUTH="-lpuredb:/etc/pureftpd.pdb -lunix"
```

because i am trying trying and trying, i am sure that i have restarted my ftp server (even true for my box) for thousand times.

the virtual users are simply cant login!! what's the thing going wrong ?   :Rolling Eyes: 

i was stuck by this for days. would anyone give me a hand and i will return with a BIG BIG thanks !!

best,

midnight~Last edited by midnite on Thu Apr 13, 2006 6:30 pm; edited 2 times in total

----------

## Voorhees51

Here's my config file for pureftp I'm using virtual users, and it works for me

One quick thing, do you have the IS_CONFIGURED var set to yes ... thats something I missed my first time.

```

# Config file for /etc/init.d/pure-ftpd

## This variable must be uncommented in order for the server to start ##

IS_CONFIGURED="yes"

## FTP Server,Port (separated by comma) ##

SERVER="-S 192.168.0.1,21"

## Number of simultaneous connections in total, and per ip ##

MAX_CONN="-c 30"

MAX_CONN_IP="-C 10"

## Start daemonized in background ##

DAEMON="-B"

## Don't allow uploads if the partition is more full then this var ##

DISK_FULL="-k 90%"

## If your FTP server is behind a NAT box, uncomment this ##

#USE_NAT="-N"

## Authentication

AUTH="-l puredb:/etc/pureftpd.db"

## Misc. Others ##

MISC_OTHER="-A -x -j -R -B"

```

----------

## lonex

Did you run "purepw mkdb" after running "purepw useradd"?

----------

## midnite

first of all, thanks Voorhees and lonex,

Voorhees, my setting is just exactly the same with yours, but just simply cant   :Crying or Very sad: 

i wanna ask, how you start your pure-ftpd ?

using the init.d script :

```
# /etc/init.d/pure-ftpd start
```

or start it by the official method method :

```
# /usr/sbin/pure-ftpd &
```

for me, if i use the former one, the pure-ftpd didnt start actually. that's mean the ftp client cant connect to it.

if i use the latter, it works.

but in order to make it starts automatically will boot, i fix the init.d script (/etc/init.d/pure-ftpd) :

```
start() {

        checkconfig || return 1

        ebegin "Starting Pure-FTPd"

        start-stop-daemon --start --quiet --exec /usr/sbin/pure-ftpd & -- $SERVER $MAX_CONN $MAX_CONN_IP $DAEMON $DISK_FULL $USE_NAT $AUTH $LOG $TIMEOUT $MISC_OTHER

        eend $?

}
```

note that i have added the (&) sign

it can start automatically now, the system beeps me for errors though.

lonex, using the option "-m" can omit the step of (# pure-pw mkdb)

thanks a lot to you all,

midnight~

----------

## cyber_d

Hi, 

I seem to be emerging and unemerging without success. I need some help please  :Smile: 

This is the current issue on my server

1) Apache 2.0.55

[ebuild     U ] net-www/apache-2.0.55-r2 [2.0.55-r1] +apache2 -debug -doc +ldap* -mpm-leader -mpm-peruser -mpm-prefork -mpm-threadpool -mpm-worker -no-suexec (-selinux) +ssl -static-modules -threads 50 kB

2) Pure-Ftpd 

[ebuild   R   ] net-ftp/pure-ftpd-1.0.21  -caps +ldap +mysql +pam -postgres (-selinux) +ssl +vchroot 0 kB

//////////////////////////

Somehow i am missing a step or 12  :Smile: 

I need to get Pure-Ftpd to log me into my server so i can work - nevermind anything else,

Could someone help me understand the (UID and  GID) maybe thats the issue

also my Legal ip is xxx.xxx.xxx.xxx

when ui was configuring SSL on the server i read in a how-to that making eth0 for 80 and eth1 for 443 or something like that (i think its called IP based  vhost) so i have a public ip and eth0 (192.168.0.1 and eht1 192.168.0.2) could this have something to do with my FTP not working

also i read maybe port 21 23 are closed

how do i ping or test them in SSH / Telnet

>> Any help would be more than well appreciated

Thanks

Dave

----------

## midnite

Hi Dave,

without knowing your situration deep, in short, uid is "user ID" and gid is "group ID".

wish i help.

i am currently stuck by the virtual users problem. i will examine your problem deeply later on  :Smile: 

midnight~

----------

## midnite

Dear Dave,

i really want to help you. yet i am new to linux and i have tried my best..

for using ssd, i may say, u may try (/etc/init.d/sshd start)   :Smile: 

on the other hand,

would someone kindly give me a hand on my virtual users problem ..  :Crying or Very sad: 

i really need your help!!

best regards,

midnight

----------

## Voorhees51

midnite

I start pureFTP using /etc/init.d/pure-ftpd start on my Gentoo box

On my BSD box I use the  /usr/local/sbin/pure-ftpd  command

 Both are using virtual users, and work.

----------

