LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-11-2006, 02:58 AM   #1
hello321_1999
Member
 
Registered: Nov 2004
Posts: 33

Rep: Reputation: 15
How do I copy files from a linux machine to a Windows machines?


I have a linux machine running SLES 8. I have a Windows XP machine. Both machines are on the same network.

While sitting at the Windows machine, I would like a simple program (ideally a drag and drop GUI, e.g. Windows Explorer) to copy files from the linux machine to this Windows machine.

Is there any free software that will allow me to do this?
If so, please can you let me know the details, where they are installed, what they do, etc.

(I am a relative newbie, so please provide sufficient details).
 
Old 05-11-2006, 03:04 AM   #2
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
What I would do is setup either a FTP server on the linux machine or samba server. That's probably the easiest. You could set up a share on windows and mount that share on Linux but write support for NTFS filesystems is a bit troublesome - at least from what I've heard/read.

-twantrd
 
Old 05-11-2006, 03:40 AM   #3
SweetLou
Member
 
Registered: Oct 2004
Distribution: Debian Testing
Posts: 171

Rep: Reputation: 30
Setup Samba to share the Linux directories that you want. Then in XP add these to your network places. Now you will be able to use Windows Explorer to drag and drop.
 
Old 05-11-2006, 06:24 AM   #4
vbisis
Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 250

Rep: Reputation: 34
To setup samba either edit smb.conf, which lies in /etc or /etc/samba or use swat. Swat is a graphical tool for configuring samba, it is quite easy to use. Access it with your webbrowser by typing http://localhost:901

If swat isn't running you have to enable it by editing inetd.conf ( just remove '#' at the beginning of the line with swat ).
Using xinetd might be a little harder, but just have a look at the files under /etc/xinetd.d then. Maybe there already is a file called swat
 
Old 05-11-2006, 01:08 PM   #5
hello321_1999
Member
 
Registered: Nov 2004
Posts: 33

Original Poster
Rep: Reputation: 15
Samba was already installed. I started swat and created a share called "Test". I mapped the "Test" share to /tmp. I bounced my linux machine. I started smbd and nmbd using the commands:
# smbd -D
# nmbd -D

All looks good, when I run the following test from the linux machine:

=====

acton:/usr/local # smbclient -L acton
added interface ip=10.108.10.133 bcast=10.108.11.255 nmask=255.255.252.0
Password:
Anonymous login successful
Domain=[YOUDEVISE] OS=[Unix] Server=[Samba 2.2.5-UL]

Sharename Type Comment
--------- ---- -------
print$ Disk Printer Drivers
Test Disk
IPC$ IPC IPC Service (Samba 2.2.5-UL)
ADMIN$ Disk IPC Service (Samba 2.2.5-UL)

Server Comment
--------- -------

Workgroup Master
--------- -------


=====

However, when I try and connect from my Windows machine, it fails:

=====

D:\>net use x: \\acton.youdevise.com\Test
The password or user name is invalid for \\acton.youdevise.com\Test.

Enter the user name for 'acton.youdevise.com': deploy
Enter the password for acton.youdevise.com:
System error 1326 has occurred.

Logon failure: unknown user name or bad password.

=====

Also, I cannot still see the share "Test" from my Windows machine in Windows Explorer? What am I missing? Any help??

Here is the smb.conf file, as shown using swat:

=====

# Samba config file created using SWAT
# from yddev006.youdevise.com (10.108.10.134)
# Date: 2006/05/11 19:05:18

# Global parameters
[global]
workgroup = YOUDEVISE
encrypt passwords = Yes
log level = 1
syslog = 0
time server = Yes
unix extensions = Yes
socket options = SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY
printcap name = CUPS
os level = 2
printing = cups
veto files = /*.eml/*.nws/riched20.dll/*.{*}/

[homes]
comment = Home Directories
valid users = %S
read only = No
create mask = 0640
directory mask = 0750
browseable = No

[printers]
comment = All Printers
path = /var/tmp
create mask = 0600
printable = Yes
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775

[Test]
path = /tmp
guest account = deploy
guest ok = Yes
=====

Last edited by hello321_1999; 05-11-2006 at 01:39 PM.
 
Old 05-11-2006, 01:46 PM   #6
vbisis
Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 250

Rep: Reputation: 34
Try accessing over network places in windows. Windows should ask you username and password. Try setting security level in samba to share, so minimal security, should work well, it does for me.
This is my smb.conf:

# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2006/04/16 10:50:19

[global]
security = SHARE

[Progs]
path = /mnt/Media/Backup
guest ok = Yes

[Games]
path = /mnt/Games
guest ok = Yes


Quite easy? I just start it in lan at home on demand, so I need no security and everyone can access those shares.
 
Old 05-11-2006, 01:57 PM   #7
SweetLou
Member
 
Registered: Oct 2004
Distribution: Debian Testing
Posts: 171

Rep: Reputation: 30
You will need to add a user for Samba.

smbpasswd -a <username>

put a username of your choice instead of <username>. I used the same username and password that is on my XP box and the password dialog box stopped comming up and the shares automatically where in my Network Places, once I added the user.
 
Old 05-11-2006, 05:14 PM   #8
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
the simple way to move files back and forth without setting up samba is to use a program called winSCP. it is free an das you are on a LAN the transfer speeds will be fast enough to not worry about the encryption overhead.

it works very much like cuteFTP and is just as simple as click and drag.

setting up samba is a great way to learn how to network linux with windows, but i have always found it simpler just to mount a windows share and push/pull things from my linux box then to get samba to work with the funky winXP not always working 100%.

http://winscp.net/eng/index.php

follow that link for winSCP. enjoy
 
Old 05-15-2006, 12:25 PM   #9
hello321_1999
Member
 
Registered: Nov 2004
Posts: 33

Original Poster
Rep: Reputation: 15
I added:

[global]
security = SHARE

and everything started working just fine. I can see my shares from my Windows machines, and I can configure the shares using the swat program.

One last question;
- How can smbd and nmbd automatically after the machine is rebooted?
 
Old 05-15-2006, 01:29 PM   #10
SweetLou
Member
 
Registered: Oct 2004
Distribution: Debian Testing
Posts: 171

Rep: Reputation: 30
I'm sorry, but do you mean how to start them after a reboot? Do you only want them to automatically start after a reboot, not when you first boot?
Do you want them to start for everyone or just you? What desktop are you using?
 
Old 05-15-2006, 01:39 PM   #11
hello321_1999
Member
 
Registered: Nov 2004
Posts: 33

Original Poster
Rep: Reputation: 15
Sorry, to clarify; what is the correct method to automatically start smbd and nmbd with parameter "-D" (this includes any method used to start the system; reboot, shutdown and reboot, etc). I think smbd and nmbd can be started using inetd, but I do not see a line for these daemons in the inetd.conf file. Or do I need to do something in the /etc/init.d folder?
 
Old 05-15-2006, 01:58 PM   #12
SweetLou
Member
 
Registered: Oct 2004
Distribution: Debian Testing
Posts: 171

Rep: Reputation: 30
In /etc/init.d I have a script that will start and stop samba
Code:
#!/bin/sh
#
# Start/stops the Samba daemons (nmbd and smbd).
#
#

# Defaults
RUN_MODE="daemons"

# Reads config file (will override defaults above)
[ -r /etc/default/samba ] && . /etc/default/samba

NMBDPID=/var/run/samba/nmbd.pid
SMBDPID=/var/run/samba/smbd.pid

# clear conflicting settings from the environment
unset TMPDIR

# See if the daemons are there
test -x /usr/sbin/nmbd -a -x /usr/sbin/smbd || exit 0

. /lib/lsb/init-functions

case "$1" in
	start)
		log_daemon_msg "Starting Samba daemons" "nmbd"

		if ! start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/nmbd -- -D; then
			log_end_msg 1
			exit 1
		fi

		if [ "$RUN_MODE" != "inetd" ]; then
			log_progress_msg "smbd"
			if ! start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/smbd -- -D; then
				log_end_msg 1
				exit 1
			fi
		fi

		log_end_msg 0
		;;
	stop)
		log_daemon_msg "Stopping Samba daemons" "nmbd"

		start-stop-daemon --stop --quiet --pidfile $NMBDPID
		# Wait a little and remove stale PID file
		sleep 1
		if [ -f $NMBDPID ] && ! ps h `cat $NMBDPID` > /dev/null
		then
			# Stale PID file (nmbd was succesfully stopped),
			# remove it (should be removed by nmbd itself IMHO.)
			rm -f $NMBDPID
		fi

		if [ "$RUN_MODE" != "inetd" ]; then
			log_progress_msg "smbd"
			start-stop-daemon --stop --quiet --pidfile $SMBDPID
			# Wait a little and remove stale PID file
			sleep 1
			if [ -f $SMBDPID ] && ! ps h `cat $SMBDPID` > /dev/null
			then
				# Stale PID file (nmbd was succesfully stopped),
				# remove it (should be removed by smbd itself IMHO.)
				rm -f $SMBDPID
			fi
		fi

		log_end_msg 0

		;;
	reload)
		log_daemon_msg "Reloading /etc/samba/smb.conf" "smbd only"

		start-stop-daemon --stop --signal HUP --pidfile $SMBDPID

		log_end_msg 0
		;;
	restart|force-reload)
		$0 stop
		sleep 1
		$0 start
		;;
	*)
		echo "Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload}"
		exit 1
		;;
esac

exit 0
This was created atuomatically for me when I installed samba.
 
  


Reply


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
samba on fedora connects to linux machine but unseen on windows machines vyom Linux - Networking 5 07-04-2006 02:25 AM
How can I copy files from my linux machine to an external hard disk? hello321_1999 Linux - Newbie 3 05-08-2006 02:00 PM
copy from windows machine to a linux machine s_deepblue Linux - Networking 3 03-12-2005 01:43 PM
browsing windows machines in linux machine SSENT12 Linux - Networking 8 07-21-2003 09:04 PM
Using SMB to copy files from one linux machine to second linux machine. coppersky Linux - Networking 9 06-24-2003 12:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:23 AM.

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