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 |
Open a terminal, become root and then:
Code:
cp /etc/shadow /etc/shadow.bak 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. |
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 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 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? |
Try apt-get with the ' -f ' option.
Code:
apt-get -f install |
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!! |
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 |
All times are GMT -5. The time now is 08:57 PM. |