LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-10-2012, 02:26 AM   #1
Felipe
Member
 
Registered: Oct 2006
Posts: 294

Rep: Reputation: 31
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
 
Old 12-10-2012, 02:26 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 1,393

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
How are you authenticating? Winbind?

What error do you get from mkdir?
 
Old 12-10-2012, 02:50 PM   #3
Felipe
Member
 
Registered: Oct 2006
Posts: 294

Original Poster
Rep: Reputation: 31
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
 
  


Reply

Tags
share, smbclient, windows


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
CentOS Directory server - Can Windows machine be added into directory server manya Linux - Server 3 01-19-2012 03:48 PM
FTP: Get count of files on a remote machine directory to the source Linux machine mamu Linux - Newbie 3 10-28-2011 04:10 PM
How do I find this shared directory on my Windows XP machine? laredotornado Linux - Networking 3 05-09-2011 02:40 PM
Not able to Create Samba account in Home Directory Machine. Arunsb1217 Linux - Networking 1 07-15-2010 11:37 AM
How to create Shared Documents Directory like in Windows XP? neranjana Linux - Newbie 1 01-11-2004 10:07 PM


All times are GMT -5. The time now is 12:11 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration