LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How can create a directory on Windows machine from Linux? (https://www.linuxquestions.org/questions/linux-software-2/how-can-create-a-directory-on-windows-machine-from-linux-4175440766/)

Felipe 12-10-2012 02:26 AM

How can create a directory on Windows machine from Linux?
 
Hello:

I'm trying to create a remote directory on a share of Windows from a Linux console (Windows computers don't have installed service ftp).

Can any tell me how can it be done?

Windows computers are joined to Active Directory but not Linux machines.
- From windows console I can create it with:
Quote:

mkdir \\server\share\directory
- From Linux console I can create it with smbclient if Linux computer is joined to Active Directory:
Quote:

smbclient -U 'DOMAIN/user%pass' -W DOMAIN -N -c '//server/share/dir'
But my Linux machine is not joined to Active Directory and smbclient doesn't work.

Any suggestion about how to create the directory on the share of windows machine from linux console?

Thanks

smallpond 12-10-2012 02:26 PM

How are you authenticating? Winbind?

What error do you get from mkdir?

Felipe 12-10-2012 02:50 PM

Hello:

Finally, I've used a java program and jcifs (http://jcifs.samba.org/).

Then I create the remote directory with:
Quote:

new SmbFile("smb://DOMAIN;username:passwd@server/share/directory")).mkdir();
Of course, the user "username" has rights to create the "directory" on the "share" of "server"

Regards


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