LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-20-2012, 02:59 AM   #1
s0pan
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Rep: Reputation: Disabled
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
 
Old 01-21-2012, 12:21 AM   #2
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Open a terminal, become root and then:
Code:
cp /etc/shadow /etc/shadow.bak
gedit /etc/shadow
Replace gedit with nano if you're on a cli (gedit doesn't work on a cli, it needs a GUI)

Find the ftp entry and remove that line, and ONLY THAT LINE, from the file. But before you do, create a copy, the code above does just that. Re-run the purge command.
 
Old 01-21-2012, 08:24 AM   #3
s0pan
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
For some reason there was no ftp entry in etc/shadow. It did exist in etc/passwd though.
I copied one of lines in etc/shadow ("ntp:*:14638:0:99999:7:::") and edited it to "ftp:*:14638:0:99999:7:::" then ran "apt-get purge vsftpd". It worked, vsftpd was removed and ftp entries in both "/etc/passwd" and "/etc/shadow" vanished, excellent!
Now to install anew:
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)
Sorry but you didn't think it would be that easy huh?
OK checked last modified file date it's 2011-05-07 so indeed overwrite did not happen, here's the contents of "/etc/logrotate.d/vsftpd":
Code:
/var/log/vsftpd.log
{
   create 640 root adm

   # ftpd doesn't handle SIGHUP properly
   missingok
   notifempty

}
Great so I figured if I run mv "/etc/logrotate.d/vsftpd" "/etc/logrotate.d/vsftpd.bak" to rename the file it doesn't have to overwrite.
But, it made no difference! "apt-get install vsftpd" gives the same output as above, even when "/etc/logrotate.d/vsftpd" does not even exist.
Unpack seems to fail, how to proceed?
 
Old 01-21-2012, 11:03 AM   #4
62chevy
Member
 
Registered: Mar 2002
Location: West (By God) Virginia
Distribution: Debian Squeeze - Sid
Posts: 281

Rep: Reputation: 45
Try apt-get with the ' -f ' option.

Code:
apt-get -f install
 
Old 01-21-2012, 11:05 AM   #5
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Good to see you've made such good progress on your own!

Apt is using the package from its cache to install, and that might be obsolete or corrupt. Clear the cache so apt is forced to fetch the latest version. Btw, did you removed it with the remove or purge option? In case of the former, try the latter first, as it'll remove any associated config files with it. Your message also shows an unfulfilled dependency and a conflict with the wd-nas package. Unless you explicitly need it, I'd suggest to purge it from the system too, to avoid such conflict. But it may be a dependency of the vsftpd package, I don't know...

PS: I assume you've already refreshed the package list with apt-get update... If you haven't, do so before continuing!!
 
Old 01-21-2012, 11:22 AM   #6
s0pan
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Solved

Thanks for the guidelines, finally got it installed!

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting error during installation via FTP Rohit_4739 Linux - Newbie 21 07-13-2011 03:25 AM
rpm installation error: service mysasd doenot support chkconfig umaparvahty Linux - Software 1 08-17-2010 09:32 AM
Wine world of warcraft installation error at terms of service sky173t Linux - Games 1 08-14-2009 03:44 PM
How to run a script that will automatically start FTP service after installation? reshmpv Linux - Newbie 2 08-18-2008 07:56 AM
ftp service error : 334 using authentication type KERBEROS_V4 vijayshah78 General 0 03-26-2004 05:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration