0

I am trying to move the SVN backup files from the local directory to a NAS device via Putty and I am using the following syntax, however I am receiving the below error message -

debian@debianvm:~/svn-backups$ smbclient //IP/Volume_1/NAS/SVN_backups/ -U 'username' 'password'
Domain=[DLINK-88F0C6] OS=[Unix] Server=[Samba 3.2.8]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME

Could you please let me know what might be the root cause?

1 Answer 1

2

You must provide a share name to smbclient; a subdirectory is not supported.

smbclient //IP/Volume_1 -U username password

You should be able to verify this by mounting the share somewhere:

mount -t cifs //IP/volume_1 /mnt/tmp -o user=username,pass=password

6
  • Giving a password on the command line is considered bad practice for security resaons: unprivileged users could potentially read the password from the output of ps or by checking the relevant parts of the /proc filesystem. In the case of smbclient you can use the -A/--authentication-file option instead, if mounting filesystems use the credentials mount option. Nov 21, 2011 at 16:05
  • And ? THat's what he did - I merely assist in troubleshooting.
    – adaptr
    Nov 21, 2011 at 16:42
  • @adaptr: just adding potentially relevant information, I wasn't suggesting your answer was wrong. I nearly added the comment to the question instead but felt it made more sense here as the question didn't mention mount and you has added that (useful) detail. Nov 22, 2011 at 10:33
  • I can mount a subdirectory (on Debian squeeze) using mount -t cifs '\\cifs.cs.brown.edu\home\jon-test' /mnt/ -o user=jon-test without problems. Also, @DavidSpillett , it conveniently asks me for my password without additional options :)
    – jade
    Dec 16, 2011 at 19:14
  • @jon: that is the way I usually do things from the command line. The credentials mount option is useful for anything that needs to perform automated mounting where no user will be present to hand over credentials via the keyboard (or where you've given users access to control certain mounts via sudo or similar but don't want them to have the actual credentials directly). Both options keep the password away from where it can be easilt read from the process list. Dec 19, 2011 at 10:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .