Enter your email address:

Delivered by FeedBurner

Sharing files between Ubuntu Feisty/Gutsy and Windows XP or VISTA


StumbleUpon Toolbar

This guide to install samba server on Ubuntu, will help you share files from your Ubuntu Feisty with the windows machines on your network.

This way maybe you will be able to use Ubuntu at your office, hope you can.

First install samba

sudo apt-get install samba

With this you will have samba installed on your system, now you need to edit the configuration file which is located at:

/etc/samba/smb.conf

Here I will put a simple minimal configuration to allow share files from your Linux server.

[global]
        workgroup = MSHOME
        netbios name = UBUNTU_SERVER
        security = SHARE
        auth methods = guest
        domain master = No
        wins support = Yes
  
[share1]
        comment = mi home
        path = /home/ggarron
        read only = No
        guest ok = Yes

Ok, the [global] section lets you configure all global parameters, which in this case are:

  • workgroup; Lets you specify the windows workgroup
  • netbios name; Lets you specify the name with your Linux PC will be seen by windows PCs
  • security; specifies the level of security, default is user, but if the users on the windows PCs are not the same as the ones on the Linux PC, you better use share instead
  • auth methods; Possible options include guest (anonymous access), sam (lookups in local list of accounts based on netbios name or domain name), winbind (relay authentication requests for remote users through winbindd), ntdomain (pre-winbindd method of authentication for remote domain users; deprecated in favour of winbind method), trustdomain (authenticate trusted users by contacting the remote DC directly from smbd; deprecated in favour of winbind method)
  • domain master; Lets you configure your PC as a domain master or not, in this case we prefer not, as our goal is only to share files
  • wins support; If you want or not to have wins enabled or not

Now comes the shares section, the string you put between the [] will be how windows will sees the share, in this case share1

    path; You put here the path you may want to share
    read only; yes or no, depending if you want to permit other users to write on this directories.
    gest ok; It is a boolean field, and will permit or not guest users to access this resource

Until here you are able to share files from your Linux PC to your Windows PCs.

If you want to configure Samba using a GUI tool, you may want to install swat (samba web administration tool).

Once again you first need to install the software, which in this case it is almost all you need to do.

sudo apt-get install swat netkit-inetd tcpd

Once installed you can open your browser and enter

http://localhost:901

You will need to login as root to have full access to configure samba by this way.

so you will first need to enable root user on Ubuntu

sudo passwd root

then choose a password for your root user.

could be good to block access to port 901 via your firewall , or use SSL to secure the connection.

How to enable SSL for SWAT?, fortunately it is easy, here is how.

1. Install OpenSSL.
2. Generate certificate and private key.

/usr/bin/openssl req -new -x509 -days 365 -nodes -config /usr/share/doc/packages/stunnel/stunnel.cnf -out /etc/stunnel/stunnel.pem -keyout -etc/stunnel/stunnel.pem

3. Remove SWAT entry from [x]inetd.
4. Start stunnel.

stunnel -p /etc/stunnel/stunnel.pem -d 901 -l /usr/local/samba/bin/swat swat

Update for Vista:

You will need samba 3.0.22 in order to see shares of Linux on Vista, and to be able to mount the Vista's shares on Linux you will maybe need to do it manually using the mount command.

mount -t smbfs -o username=[username] password=[secret] //ip_address/share /mountpoint

Please post your experiences, if you want to know more about Linux, and how to work with it,

Subscribe to my full RSS news

, there you will not only find the titles and a summary but all the article.

Related articles.

Access your Linux Partition from Vista on a Dual boot PC
Access your Linux Partition from XP on a Dual boot PC

If you want to learn more about Samba check this out

Trackback URL for this post:

http://www.go2linux.org/trackback/98
StumbleUpon Toolbar

 If you like this article, subscribe to our full rss

If this article was somehow useful for you, you can leave something in the tip's jar

Please post your question in our forum and use comments only to leave your comments about the article, thanks.

Sharing files between Feisty and Windows XP or VISTA part 2

Ubuntu 7.04+XP
If you are at the point of seeing and accessing window shares from Linux, but can't access Linux folders from xp try this. Install SAMBA FIRST!
Found at Synaptic package manager. I checked & installed the samba packages and the smb and swat packages. Also check system-administration-services
be sure samba is running in server settings

1. You cannot be logged in to Ubuntu more than once. So the windows xp needs to log in with a different account than what is running on the ubuntu machine.

2. The second account needs to be both a ubuntu user (added in Users and Groups under administration) RECHECK step2

2. The second account needs to be both a ubuntu user (added in Users and Groups under administration, basic user not with admin. permissions) Now create a samba user. From the terminal, type

sudo smbpasswd -a username
first try is your root password
2nd is the new pass for the samba account
to add a samba user. Adding a user to samba will fail
if you didn't add that same user in the O.S. as a user.

It will then ask for a password. Just make sure the password AND the username are the same for Ubuntu and Samba. Hopefully you should be able to log in then from the XP machine.

Double check, you have made the folder sharing
in Linux and check the permissions.
Also System-administration-shared folders-General Properties
there you can change the domain name.

This has worked for me and everything is networked and shared with proper permissions
in less then 10 minutes.

Good luck

Re:Sharing Files between Feisty and Windows XP or Vista part 2

Thank you very much for you help making this How To better!

Guillermo

I am trying to mount (in

I am trying to mount (in ubuntu feisty fawn) a windows share that is in a domain not a workgroup. I did all the steps above and left out Workgroup=MSHOME. No errors when mounting. Mount says it is mounted. But when I try to ls -l on the mountpoint I get permission denied.

What needs to be done different if I am mounting a share on a windows domain?

dan

I will try to replicate what

I will try to replicate what you describe tomorrow and let you know if I success.

Guillermo Garron

I had everything setup

I had everything setup correctly for my ubuntu machine and wasn't able to figure out the permissions on the shared folder. I followed your instructions for granting a user account the SMB account and voila, I was able to login using the account. Your instructions worked like a charm, thanks!

If you can see the Linux box

If you can see the Linux box from the XP, but cannot access it, make sure that you are not being blocked by any software firewall (either XP or, for example, Zone Alarm). Check the firewall logs, and if necessary set up a Trusted Zone for your LAN.

I'm running Ubuntu Feisty

I'm running Ubuntu Feisty Fawn and I am now able to access my shared folders from my xbox media center perfectly. Thanks.

Thanks for the great and

Thanks for the great and simple howto.
Got it working.
Just have one small weirdness: when I create, remove or rename file and folders from XP I only see the results after I refresh the window with F5...
Any ideas as why that is?

Luciano

Sorry, I really have no

Sorry, I really have no idea, If I come with an answer I will post it here, but if anyone has it, please let us all know.

Thanks solved a couple of

Thanks solved a couple of days of frustration.

Much appreciated

When I first brought my

When I first brought my laptop into the office I was surprised that getting on the network was so easy (accessing other computer). Everyone else (Windows XP) was struggling with Network Setup Wizard, while my laptop (Feisty) just connected.

Thanks for the this article... will set this up next week.

Yes it is that easy, even

Yes it is that easy, even printing on "windows" printers is really easy if they are shared.

Guillermo Garron

Hi I am new to Ubuntu7.10

Hi
I am new to Ubuntu7.10

I have installed all the software just by few cliks using add/remove.
If i format the system in future i lost all. again i need to download from internet.
Is there any way to create .deb packages with already installed programs on my system

thanks for your help!...........

You can backup your system,

You can backup your system, I think could be the best option

http://www.go2linux.org/scp-duplicity-secure-backup
http://www.go2linux.org/how-to-backup-linux

There is other option
http://www.go2linux.org/forums/aptoncd-how-to-clone-your-linux-system-t-...

but here, you will have to download everything again, and you will loose your personal Data, you will only recover, your installed packages,

hope it helps, if you need more support, please post in the forums

http://www.go2linux.org/forums

Guillermo Garron

HI all, im also new to linux

HI all,

im also new to linux and have very little networking experienced so let me know if i need to give you more info.

i think i set up my samba share ok but when i try to view workgroup computers i get an error

"samba is not accessible. you might not have permission to use this network resource. contact the administrator of this server to find out if you have access permissions.

list of servers for this workgroup not currently available."

so im wondering what i did wrong. these are home computers im working with so permissions shouldnt be a problem.

Hi, I have put your question

Hi, I have put your question in the forums, here is the link:

http://www.go2linux.org/forums/samba-problem-samba-is-not-accessible-t-1...

Guillermo Garron

thanks

thanks

Hi guys me 2 I'm new in

Hi guys
me 2 I'm new in linux
I just wanted to try this system ubuntu-8.04 from my cousin
in the 1st partition XP and in the 2nd partition linux
when I return to XP I can't rename or access files named by :?*
PLEASE HELP ME TO RENAME THIS FILES IN XP.
And sorry for my bad english.

Hi, please post your

Hi,

please post your question at:

http://www.go2linux.org/forums/

And give us some more details, like if you some way accessed your windows files from Linux? do you have a shared partition?

please post that in the forums, I will be more than happy to help you.

Guillermo Garron

Thanks so much for the

Thanks so much for the samba.conf configuration.

ill hope u can give me, tips for proxy-ubuntu (squid.conf)

best regards,
Rachmad

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Captcha
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

This site is proudly hosted at Bluefur Hosting