You are not logged in.

#1 2015-01-03 15:17:51

Astroarch
Member
From: Germany
Registered: 2014-03-21
Posts: 85

Create new FTP user for VSFTPD

Hello guys,
I have a question regarding ftp user.
I primarily use an ftp server to sincronyze some files between my laptop and my desktop PC, using vsftpd.
I think should be appropriate to add a new user and allow it to login into the server via Filezilla but creating a new user (into the ftp group) will also create a new user-home directory?
Can I create a user without creating it?

Thanks.

Offline

#2 2015-01-03 15:32:13

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: Create new FTP user for VSFTPD

Why not just use the "-M" flag?

-M
  Do no create the user's home directory, even if the system wide setting from
  /etc/login.defs (CREATE_HOME) is set to yes.

All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2015-01-03 19:59:37

Astroarch
Member
From: Germany
Registered: 2014-03-21
Posts: 85

Re: Create new FTP user for VSFTPD

Thanks!
I created the user, assigned it to ftp group and provided a password but I cannot login... :rolleyes :rolleyes

Last edited by Astroarch (2015-01-03 20:00:27)

Offline

#4 2015-01-03 20:13:40

bleach
Member
Registered: 2013-07-26
Posts: 264

Re: Create new FTP user for VSFTPD

have you looked at the vsftp wiki page it shows a ingenius way at the bottom of that page for creating users with pam in the category of tips and tricks.
dont forget to add your user to the virtual group if you want to be able to edit it as that user(localy) and root(localy always of course). also if it is just for you or for others that should be able to edit(in there own user environment) remember if you make it a chroot lock also allow_writeable_chroot=YES.

Last edited by bleach (2015-01-03 20:28:25)

Offline

#5 2015-01-03 20:34:38

Astroarch
Member
From: Germany
Registered: 2014-03-21
Posts: 85

Re: Create new FTP user for VSFTPD

I never heard about PAM but for what I can understand is a workaround to have virtual users, right?

Offline

#6 2015-01-03 20:46:15

bleach
Member
Registered: 2013-07-26
Posts: 264

Re: Create new FTP user for VSFTPD

I believe the title is pam with virtual user... you basicaly create hashed passwords for users and within the vsftp.conf file just create $USER where it shows....

Offline

#7 2015-01-03 20:47:54

Astroarch
Member
From: Germany
Registered: 2014-03-21
Posts: 85

Re: Create new FTP user for VSFTPD

I have understood everything now, thanks for the support and the time spent for me!

Offline

#8 2015-01-03 21:22:07

Astroarch
Member
From: Germany
Registered: 2014-03-21
Posts: 85

Re: Create new FTP user for VSFTPD

I cannot install pam_pwdfile with this error:

Packages (1) pam_pwdfile-1.0-1

Total Installed Size:  0.03 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                                         [########################################################################] 100%
(1/1) checking package integrity                                                                                       [########################################################################] 100%
(1/1) loading package files                                                                                            [########################################################################] 100%
(1/1) checking for file conflicts                                                                                      [########################################################################] 100%
error: failed to commit transaction (conflicting files)
pam_pwdfile: /lib exists in filesystem
Errors occurred, no packages were upgraded.

Offline

#9 2015-01-03 21:34:55

bleach
Member
Registered: 2013-07-26
Posts: 264

Re: Create new FTP user for VSFTPD

what does pacman -Qm show for that file.

Offline

#10 2015-01-03 21:38:52

Astroarch
Member
From: Germany
Registered: 2014-03-21
Posts: 85

Re: Create new FTP user for VSFTPD

Do you mean in this way?

pacman -Qm pam_pwdfile-1.0-1-x86_64.pkg.tar.xz
error: package 'pam_pwdfile-1.0-1-x86_64.pkg.tar.xz' was not found
warning: 'pam_pwdfile-1.0-1-x86_64.pkg.tar.xz' is a file, you might want to use -p/--file..

Offline

#11 2015-01-03 22:00:59

bleach
Member
Registered: 2013-07-26
Posts: 264

Re: Create new FTP user for VSFTPD

no just this way

pacman -Qm pam_pwdfile

the pacman -Qm -Q=query -m=foreign so anything built via aur(aur is actually like torrent in that it just has pkgbuilds(like .torrents) that point to any number of places) or otherplaces that creates arch pkg's or xz's that arch can understand of course you can build things outside of its knowledge and then it will not know about them and thus will not apply to that list. when inputing  pacman -Qm pam_pwdfile tell you if it is installed or not.

Offline

#12 2015-01-03 22:02:13

Astroarch
Member
From: Germany
Registered: 2014-03-21
Posts: 85

Re: Create new FTP user for VSFTPD

pacman -Qm pam_pwdfile
error: package 'pam_pwdfile' was not found

Not installed.
So, it is strange.

I report again the complete passage I did:

[xxxx@yyyy pam_pwdfile]$ makepkg -s
==> Making package: pam_pwdfile 1.0-1 (Sat Jan  3 23:03:33 CET 2015)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found v1.0.tar.gz
==> Validating source files with sha1sums...
    v1.0.tar.gz ... Passed
==> Extracting sources...
  -> Extracting v1.0.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
make: Nothing to be done for 'all'.
==> Entering fakeroot environment...
==> Starting package()...
/usr/bin/install -m 0755 -d /home/xxxx/Downloads/pam_pwdfile/pkg/pam_pwdfile/lib/security
/usr/bin/install -m 0755 pam_pwdfile.so /home/xxxx/Downloads/pam_pwdfile/pkg/pam_pwdfile/lib/security
==> Tidying install...
  -> Purging unwanted files...
  -> Removing libtool files...
  -> Removing static library files...
  -> Compressing man and info pages...
  -> Stripping unneeded symbols from binaries and libraries...
==> Creating package "pam_pwdfile"...
  -> Generating .PKGINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: pam_pwdfile 1.0-1 (Sat Jan  3 23:03:37 CET 2015)
[xxxx@yyyy pam_pwdfile]$ dir
pam_pwdfile-1.0-1-x86_64.pkg.tar.xz  pkg  PKGBUILD  src  v1.0.tar.gz
[xxxx@yyyy pam_pwdfile]$ sudo pacman -U pam_pwdfile-1.0-1-x86_64.pkg.tar.xz
[sudo] password for xxxx: 
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) pam_pwdfile-1.0-1

Total Installed Size:  0.03 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
error: failed to commit transaction (conflicting files)
pam_pwdfile: /lib exists in filesystem
Errors occurred, no packages were upgraded.
[xxxx@yyyy pam_pwdfile]$ nano PKGBUILD
[xxxx@yyyy pam_pwdfile]$ 

Last edited by Astroarch (2015-01-03 22:06:54)

Offline

#13 2015-01-04 02:10:09

bleach
Member
Registered: 2013-07-26
Posts: 264

Re: Create new FTP user for VSFTPD

it may not be the best solution but could you not put the pam_pwdfile.so in /lib/security/ for thats all it does. Unfortunately I can not seem to get the pkgbuild to work either I do not make then and it seems to be a bit above me. That specific pkgbiuld is simple unfortenatly I am not familiar with the language and what I have read and tried has failed. though moving that file has worked though it is not prime it is a solution until someone who knows comes to bare.

Offline

#14 2015-01-04 10:48:22

Astroarch
Member
From: Germany
Registered: 2014-03-21
Posts: 85

Re: Create new FTP user for VSFTPD

Thanks bleach!
I can try to install this package in the other laptop and see what happens.
Then, as a fill-up solution, I can use a real account user, not virtual. I think should be possible, right?

Offline

#15 2015-01-04 11:56:51

Astroarch
Member
From: Germany
Registered: 2014-03-21
Posts: 85

Re: Create new FTP user for VSFTPD

Update: also in the Sony VAIO laptop I have the same issue, then is an error of the package itself.
Someone has a way to solve?

Offline

Board footer

Powered by FluxBB