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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-11-2006, 02:58 AM
|
#1
|
Member
Registered: Nov 2004
Posts: 33
Rep:
|
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).
|
|
|
05-11-2006, 03:04 AM
|
#2
|
Senior Member
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440
Rep:
|
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
|
|
|
05-11-2006, 03:40 AM
|
#3
|
Member
Registered: Oct 2004
Distribution: Debian Testing
Posts: 171
Rep:
|
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.
|
|
|
05-11-2006, 06:24 AM
|
#4
|
Member
Registered: Dec 2005
Distribution: Slackware
Posts: 250
Rep:
|
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
|
|
|
05-11-2006, 01:08 PM
|
#5
|
Member
Registered: Nov 2004
Posts: 33
Original Poster
Rep:
|
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.
|
|
|
05-11-2006, 01:46 PM
|
#6
|
Member
Registered: Dec 2005
Distribution: Slackware
Posts: 250
Rep:
|
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.
|
|
|
05-11-2006, 01:57 PM
|
#7
|
Member
Registered: Oct 2004
Distribution: Debian Testing
Posts: 171
Rep:
|
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.
|
|
|
05-11-2006, 05:14 PM
|
#8
|
Senior Member
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,992
|
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
|
|
|
05-15-2006, 12:25 PM
|
#9
|
Member
Registered: Nov 2004
Posts: 33
Original Poster
Rep:
|
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?
|
|
|
05-15-2006, 01:29 PM
|
#10
|
Member
Registered: Oct 2004
Distribution: Debian Testing
Posts: 171
Rep:
|
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?
|
|
|
05-15-2006, 01:39 PM
|
#11
|
Member
Registered: Nov 2004
Posts: 33
Original Poster
Rep:
|
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?
|
|
|
05-15-2006, 01:58 PM
|
#12
|
Member
Registered: Oct 2004
Distribution: Debian Testing
Posts: 171
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 03:26 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|