LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-06-2016, 11:34 AM   #1
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 267

Rep: Reputation: Disabled
Slackpkg FTP login


I have 3 machines running slack 64 current, and I have a portable drive on which I keep an up-to-date mirror for updating my machines.

My new router (TP-Link WD-9980) has facilities for NAS, and it seemed to me that a better solution would be to put my mirror on NAS, so that I could update whatever machine I happened to be on, without carrying a portable device around - and forgetting to put it back when finished!

Unfortunately, the ftp server for the NAS doesn't appear to allow anonymous logins. The smb server does, but slackpkg doesn't appear to support smb. And I can't find where slackpkg stores its ftp login information. It doesn't appear to be in either the .conf or mirrors files.

Does anyone know how to make slackpkg login non-anonymously? Or am I on a loser here?

TIA,

--
Pete
 
Old 11-06-2016, 11:42 AM   #2
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,147

Rep: Reputation: Disabled
In Gentoo I put portage on NFS and mount the share from every box. Why keep a local copy of everything, right? You should be able to do it in Slackware, too. Does your NAS have NFS?
 
Old 11-06-2016, 11:50 AM   #3
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 267

Original Poster
Rep: Reputation: Disabled
Yes, that's what I'm trying to achieve. Sadly, the NAS only supports ftp and smb. Slackpkg supports ftp, but not smb, so it looks like I'm stuck with ftp.

It *ought* to work, as it will log anonymously into ftp servers on the net, but the NAS doesn't appear to support logins without a password - fairly sensible, I suspect! But I can't find where to set a password for ftp in slackpkg!

Thanks for your assistance!

--
Pete
 
Old 11-06-2016, 12:07 PM   #4
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,147

Rep: Reputation: Disabled
For normal users you can set FTP password in ~/.netrc, what user runs slackpkg?
 
Old 11-06-2016, 12:12 PM   #5
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 267

Original Poster
Rep: Reputation: Disabled
Slackpkg has to be run as root (its updating system files). I'm sure it must have ftp login configured somewhere, but I can't find it!

I don't have .netrc in my user account. Normally, for ftp transfers I use gftp. My network connections are managed by NetworkManager.

Thanks for the suggestion! Keep 'em coming!

--
Pete
 
Old 11-06-2016, 12:14 PM   #6
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,147

Rep: Reputation: Disabled
You can create ~/.netrc and its contents will be read by FTP client.
 
1 members found this post helpful.
Old 11-06-2016, 10:16 PM   #7
bassmadrigal
Senior Member
 
Registered: Nov 2003
Location: Newport News, VA
Distribution: Slackware
Posts: 4,423

Rep: Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365
Can you just use the normal ftp login:password option in your /etc/slackpkg/mirrors?

Code:
ftp://username:password@192.168.1.1/slackware/slackware64-current/

Last edited by bassmadrigal; 11-06-2016 at 10:17 PM. Reason: stupid smiley parsing
 
2 members found this post helpful.
Old 11-07-2016, 03:56 AM   #8
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 267

Original Poster
Rep: Reputation: Disabled
D'oh! Of course!

Why do I always look for a complex answer when there's a simple one staring me in the face?

Many thanks! That worked perfectly!

Now all I have to do is work out how to sync the NAS with the mirror. rsync cant handle two network connections at once it appears. Can lftp do this? or ftpsync? Any suggestions?

Cheers,

--
Pete
 
Old 11-07-2016, 07:21 AM   #9
Slax-Dude
Member
 
Registered: Mar 2006
Location: Valadares, Portugal
Distribution: Slackware
Posts: 412

Rep: Reputation: 152Reputation: 152
Quote:
Originally Posted by pchristy View Post
I have a portable drive on which I keep an up-to-date mirror for updating my machines.
Quote:
Originally Posted by pchristy View Post
Now all I have to do is work out how to sync the NAS with the mirror.
How were you keeping the portable drive updated? Could you not use this method to update your NAS?
 
Old 11-07-2016, 08:42 AM   #10
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 267

Original Poster
Rep: Reputation: Disabled
I use rsync to update the portable drive, and that works well. Unfortunately, rsync doesn't seem support a non-local destination directory. I've had a go using lftp, which I *almost* got to work - I'm struggling a bit with the syntax. However, the NAS supports smb as well as ftp, so it looks as if I might be able to mount the NAS via smb, so that it looks like a local directory, and then use rsync as at present.

I'm going to have a go at that later today - got some chores to do first!

--
Pete
 
Old 11-07-2016, 08:59 AM   #11
bassmadrigal
Senior Member
 
Registered: Nov 2003
Location: Newport News, VA
Distribution: Slackware
Posts: 4,423

Rep: Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365
You could use curlftpfs to mount an FTP directory locally. It'd make rsync much easier.

Code:
curlftpfs 192.168.1.1 /mnt/NAS/ -o user=username:password,allow_other
You could create an fstab entry to have it mounted automatically.

Code:
curlftpfs#user:password@192.168.1.1 /mnt/NAS fuse defaults,allow_other,_netdev 0 0
 
2 members found this post helpful.
Old 11-07-2016, 10:51 AM   #12
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 267

Original Poster
Rep: Reputation: Disabled
Yes, that looks like a good possibility too! Indeed, reading the info, it seems to have advantages over smb. It will be tomorrow before I get chance to compile it though - I seem to be running out of free time today!

Many thanks for the pointers!

--
Pete
 
Old 11-07-2016, 11:16 AM   #13
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,160
Blog Entries: 2

Rep: Reputation: 166Reputation: 166
Exclamation

Quote:
Originally Posted by bassmadrigal View Post
You could use curlftpfs to mount an FTP directory locally. It'd make rsync much easier.

Code:
curlftpfs 192.168.1.1 /mnt/NAS/ -o user=username:password,allow_other
You could create an fstab entry to have it mounted automatically.

Code:
curlftpfs#user:password@192.168.1.1 /mnt/NAS fuse defaults,allow_other,_netdev 0 0
this is most interesting man!
 
Old 11-08-2016, 09:11 AM   #14
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 267

Original Poster
Rep: Reputation: Disabled
Thanks to all for your help and advice! I've sort of managed to achieve what I want with both cifs and curlftpfs, but have run into issues with both - though not related to my original question! Unfortunately the "cheap and cheerful" NAS system that is part of my router only supports FAT and NTFS file systems as well, which gives me a headache when trying to copy the Slackware mirror to them (symlinks, etc).

Since this is wandering off the original topic, I'm going to start a new thread seeking advice on this issue. I'm sure what I'm attempting must be possible, and may be of interest to others fighting the built-in limitations of such a system.

Again, thanks to all those who have contributed responses to this thread.

--
Pete
 
  


Reply

Tags
ftp, slackpkg


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] slackpkg FTP access error ..!! kn0w- Slackware 11 06-05-2012 04:58 PM
local ftp login OK - remote ftp login failure bluethundr Linux - Newbie 3 08-24-2011 12:13 PM
Slackware 13 And slackpkg URL's are wrong (Swedish ftp.sunet.se) MDKDIO Slackware 2 09-01-2009 11:32 AM
FTP Server Up and running... how do I hide ftp users from local login screen? joe1031 Mandriva 2 03-18-2005 05:24 PM

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

All times are GMT -5. The time now is 02:34 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration