Copy files to samba share Ubuntu 14.04


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Copy files to samba share Ubuntu 14.04
# 1  
Old 09-13-2016
Copy files to samba share Ubuntu 14.04

I am trying to use mv or cp rsync to copy folders to a samba share. I can manually copy the folders to the share, but can not seem to access it using command line. Thank you Smilie.

Code:
smbclient //path/to/cifs/share <password>  -W <domain> -u <user>
WARNING: The "syslog" option is deprecated
Domain=[****] OS=[Unix] Server=[****]

Code:
mv -v /home/cmccabe/ToDo /path/to/cifs/share
mv: cannot move ‘/home/cmccabe/ToDo’ to ‘/path/to/cifs/share’: No such file or directory

Code:
cp home/cmccabe/ToDo /path/to/cifs/share
 cp: cannot create regular file, No such file or directory


Last edited by cmccabe; 09-13-2016 at 11:17 AM.. Reason: added cp
# 2  
Old 09-13-2016
smbclient is a network utility. /path/to/cifs/share does not exist on your system, hence can't be found by cp, which is not.

If you want the file share to be part of your filesystem tree, you have to mount it.

I think it goes something like:

Code:
mount.cifs //path/to/cifs/folder /mnt/localfolder -o username=whatever,password=pass

See man mount.cifs
This User Gave Thanks to Corona688 For This Post:
# 3  
Old 09-13-2016
Look into smbmount.
This User Gave Thanks to RudiC For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Mounting a samba share

Hi, I need to mount a directory from a Windows server to a CentOS box. The Windows server used is Windows Server 2003, and the path to the directory that I want to mount on CentOS is C:\Tomcat6\webapps\NASApp\logs. I am not sure of the correct way to mount this on CentOS, as most of the... (2 Replies)
Discussion started by: anaigini45
2 Replies

2. Red Hat

Samba share - currently not working

Long running samba share. Never have any problems, Suddenly started asking windows users for password - which doesnt work. Tried to manually reset smb password and manually map - still wrong password. Restart samba? (2 Replies)
Discussion started by: psychocandy
2 Replies

3. UNIX for Beginners Questions & Answers

Samba Share access from windows

Hello, I want to connect to two samba shares both on the same Linux box but each with a different username from a windows server 2008. I created 2 gpos to connect and I can connect to the shares individually via net use command, but once I entered credentials for one of the shares, it seems I... (1 Reply)
Discussion started by: zaineyma
1 Replies

4. Proxy Server

Unable to access Samba share with Ubuntu on Win7

I have an issue with my Samba share - I am unable to write to it, edit a file or rename a folder etc within Windows. I am using Windows 7 and Ubuntu 12.04 and this is my Samba config. I can connect to the /sylius directory no problem (no password required), but I cannot save to it. Is... (3 Replies)
Discussion started by: crmpicco
3 Replies

5. Ubuntu

Logging samba share in Ubuntu 12.04 LTS

Hi guys I am trying to log full_audit on my samba shares so I know who is creating, deleting, renaming, moving etc. files and directories in the samba/windows share. In my etc/samba/smb.conf file, under I have: # Audit settings full_audit: prefix = %u|%I|%S full_audit:failure =... (0 Replies)
Discussion started by: Akshay Hegde
0 Replies

6. Red Hat

How to Map AD groups to Samba share?

I am setup a samba share server which is authenticating from Active Directory. I am able to access the share with AD user but not able to access when group defined in "valid users" parameters. below are the steps i performed. In smb.conf workgroup = QASLABS password server =... (3 Replies)
Discussion started by: sunnysthakur
3 Replies

7. Solaris

samba issue: one samba share without password prompting and the others with.

Hi All, I've been trying to configure samba on Solaris 10 to allow me to have one share that is open and writable to all users and have the rest of my shares password protected by a generic account. If I set my security to user, my secured shares work just fine and prompt accordingly, but when... (0 Replies)
Discussion started by: ideal2545
0 Replies

8. Solaris

SAMBA is connecting to the share somehow as root

I'm running Solaris 10 with Samba server. The client is a Windows XP desktop. I have set this up for various other servers and this is the first time that I'm seeing the problem. I have a prod & test solaris samba server configured exactly the same and the share is encrypted by Vormetric. The... (0 Replies)
Discussion started by: woot14
0 Replies

9. Linux

Samba share script

Hi everyone! I'm trying to run a script when a folder is shared and when it stop being shared. Is there something like .start_share or .stop_share scripts in Samba where I could run some commands?:confused: edit: maybe with a wrapper in smbmount but I share folders via nautilus. Any ideas? (0 Replies)
Discussion started by: funyotros
0 Replies

10. Solaris

Samba: share subfolder as read only.

Hi, Currently I have a Samba shared configured as follows: comment = Public fileshare path = /u02/pub guest ok = Yes writeable = Yes There is a subfolder under /u02/pub called /u02/pub/expenses/hardware that I need to make read only. How do I do this? I am new to using Samba. ... (2 Replies)
Discussion started by: sparcman
2 Replies
Login or Register to Ask a Question