Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


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

Rep: Reputation: 31
How can create a directory on Windows machine from Linux?


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:
mkdir \\server\share\directory
- From Linux console I can create it with smbclient if Linux computer is joined to Active Directory:
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?

Old 12-10-2012, 02:26 PM   #2
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,220

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

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

Original Poster
Rep: Reputation: 31

Finally, I've used a java program and jcifs (

Then I create the remote directory with:
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"



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 03:07 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration