Find the answer to your Linux question:
Results 1 to 4 of 4
I'm trying to remove the ftp service so I can reinstall it. Using apt-get remove and apt-get purge didn't remove it properly and apt-get install won't overwrite it. Here's what ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2012
    Posts
    3

    FTP service installation error


    I'm trying to remove the ftp service so I can reinstall it. Using apt-get remove and apt-get purge didn't remove it properly and apt-get install won't overwrite it. Here's what I get now:

    "
    :~# apt-get remove vsftpd

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages will be REMOVED:
    vsftpd
    0 upgraded, 0 newly installed, 1 to remove and 258 not upgraded.
    1 not fully installed or removed.
    After this operation, 475kB disk space will be freed.
    Do you want to continue [Y/n]? y
    (Reading database ...
    dpkg: warning: files list file for package `ramlog' missing, assuming package has no files currently installed.

    dpkg: warning: files list file for package `libparted0' missing, assuming package has no files currently installed.
    (Reading database ... 18505 files and directories currently installed.)
    Removing vsftpd ...
    userdel: error deleting shadow password entry
    /usr/sbin/deluser: `/usr/sbin/userdel ftp' returned error code 1. Exiting.
    dpkg: error processing vsftpd (--remove):
    subprocess installed post-removal script returned error exit status 1
    Errors were encountered while processing:
    vsftpd
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    "

    ...After rebooting run a couple of more commands:

    "
    :~# userdel -f ftp
    userdel: error deleting shadow password entry

    :~# ps -u ftp
    PID TTY TIME CMD
    "

    ..? Please advice

  2. #2
    Linux User Daan's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    323
    You could try

    [CODE]# cat /etc/shadow|grep ftp[\CODE]

    and

    [CODE]# cat /etc/passwd|grep ftp[\CODE]

    to see whether user ftp actually exists.

    Maybe reintstalling vsftpd and then removing it again will do the trick?
    OS's I use: Debian testing, Debian stable, Ubuntu, OpenSuse 12.1, Windows 7, Windows Vista, Windows XP

  3. #3
    Just Joined!
    Join Date
    Jan 2012
    Posts
    3
    OK for some reason the user ftp was only in '/etc/passwd' but not in '/etc/shadow'. I managed to remove vsftpd by copying one of lines in etc/shadow ("ntp:*:14638:0:99999:7:::") and editing to "ftp:*:14638:0:99999:7:::", then ran "apt-get purge vsftpd". It worked, vsftpd was removed and the user ftp in both '/etc/passwd' and '/etc/shadow' vanished, excellent!

    But now there's an error when trying to install:
    Code:
    :~# apt-get install vsftpd
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following NEW packages will be installed:
      vsftpd
    0 upgraded, 1 newly installed, 0 to remove and 258 not upgraded.
    Need to get 143kB of archives.
    After this operation, 475kB of additional disk space will be used.
    Get:1 http;//ftp.us.debian.org squeeze/main vsftpd 2.3.2-3+squeeze2 [143kB]
    Fetched 143kB in 1s (84.1kB/s)
    Preconfiguring packages ...
    (Reading database ...
    dpkg: warning: files list file for package `ramlog' missing, assuming package has no files currently installed.
    
    dpkg: warning: files list file for package `libparted0' missing, assuming package has no files currently installed.
    (Reading database ... 18505 files and directories currently installed.)
    Unpacking vsftpd (from .../vsftpd_2.3.2-3+squeeze2_powerpc.deb) ...
    dpkg: error processing /var/cache/apt/archives/vsftpd_2.3.2-3+squeeze2_powerpc.deb (--unpack):
     trying to overwrite '/etc/logrotate.d/vsftpd', which is also in package wd-nas 01.00.01-46026
    Processing triggers for man-db ...
    Errors were encountered while processing:
     /var/cache/apt/archives/vsftpd_2.3.2-3+squeeze2_powerpc.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    So I renamed '/etc/logrotate.d/vsftpd' to avoid the overwrite, but when I run the install the output is the same as above. Unpacking fails with the same error even when '/etc/logrotate.d/vsftpd' does not even exist?

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jan 2012
    Posts
    3
    Thanks for the guidelines, finally got it installed!

    dpkg -i --force-overwrite /var/cache/apt/archives/vsftpd_2.3.2-3+squeeze2_powerpc.deb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •