-
HOWTO: Setup Samba peer-to-peer with Windows
HOWTO: Setup Samba peer-to-peer with Windows
As many fellow Ubuntu users seem to have trouble setting up samba peer-to-peer with Windows I decided to write a small howto on this matter.
NOTE: I am aware that there's a wiki-page as well as several other howto's around - but by looking at the constant "how do I setup samba" posts that are floating around in the forum I simply see the need for a more thourough guide on this matter.
Feel free to contribute and suggest - it'll only help to make this howto a better guide.
The goal of this howto is to have samba act like a Windows Workstation in the LAN. As a "value added bonus" we will use samba to do netbios name resolution so that you can use the names of the workstations for network drive mapping instead of their ip-addresses (i.e.: \MY_WINDOWS_BOX\SHARE) - but only for as long as your Linux box has an static ip-address and is up and running.
This guide is based on Ubuntu 6.06 LTS and intended for all architectures (i386, AMD64, ...) - if you are still using Breezy it's safe to follow this guide as there should be no differencies.
A second guide on how to setup samba as Primary Domain Controller along with several other services such as DHCP, DNS and NTP will follow later on as this topic will be a little more thourough.
1. Prerequisites
- Your Linux box should have an static ip-address.
In case you're getting your ip from a router/server via DHCP make sure it's configured to provide a fixed dhcp-lease. If that's no valid option you cannot use WINS ... more on this way down.
- You need to have samba installed.
If you haven't done so already open a terminal and type:
Code:
sudo apt-get install samba
Don't close the terminal upon installation - we still need the commandline to get several tasks done!
2. Getting samba configured
First, let us make sure samba isn't running:
Code:
sudo /etc/init.d/samba stop
As a starting point I included an smb.conf below, and there are only a few simple things you may need to tweak.
Since the installation of samba just installed a rather useless template file we're going to rename it - we keep the file just in case.
Code:
sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.template
Next we create a new empty file
Code:
sudo touch /etc/samba/smb.conf
And finally we need to open the file inside an editor
Code:
sudo gedit /etc/samba/smb.conf
NOTE: If you're on KDE replace "gedit" with "kate"
Copy / Paste the contents of the code-section below into your editor and read on ...
Code:
[global]
; General server settings
netbios name = YOUR_HOSTNAME
server string =
workgroup = YOUR_WORKGROUP
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast
wins support = yes
printing = CUPS
printcap name = CUPS
syslog = 1
syslog only = yes
; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
;valid users = %S
;create mode = 0600
;directory mode = 0755
;browseable = no
;read only = no
;veto files = /*.{*}/.*/mail/bin/
; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no
; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no
; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775
[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no
; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
;path = /media/cdrom
;browseable = yes
;read only = yes
;guest ok = yes
[MyFiles]
path = /media/samba/
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0755
force user = YOUR_USERNAME
force group = YOUR_USERGROUP
Ok, I already mentioned that there are a few simple things you may need to tweak; so here they are:
-> netbios name = YOUR_HOSTNAME
Replace "YOUR_HOSTNAME" with your desired hostname (don't use spaces!). Best pratice would be to use the same name you configured upon installation.
Example:
netbios name = DAPPER
-> workgroup = YOUR_WORKGROUP
Replace "YOUR_WORKGROUP" with the name of your workgroup, but make sure you're using the same as configured in Windows.
To find out the Workgroup name in Windows follow these steps:
- Click "START"
- Click "Control Panel"
- Click "System"
- Click the 2nd Tab entitled "Computername" and find the name of the Workgroup there.
Example:
workgroup = MSHOME
-> wins support = yes
If your box doesn't have a static ip-address, or you cannot configure your router/server to provide you with a fixed dhcp-lease, change this configuration parameter to "no".
In this case you cannot use the benefits of WINS.
-> [MyFiles]
This is the name of the share. Leave it as it is or adjust it to whatever you prefer. Don't use more than 31 characters and try to avoid spaces!
-> path = /media/samba/
This suggests that you've mounted an hard drive or partition on /media/samba where all the shared files will be stored.
In case you don't have an extra hard drive/partition you may also create folder.
I assume you've been wise enough to put /home onto a separate partition having an reasonable amount of storage space.
To create the folder type (inside a new terminal) ...
Code:
sudo mkdir /home/samba
... and adjust "path =" to read ...
path = /home/samba/
Remember that this is just an example - you are free to put things wherever you like.
-> force user = YOUR_USERNAME
-> force group = YOUR_USERNAME
Well, this should say it all. Replace "YOUR_USERNAME" with the name you use for login (no spaces!).
Example:
force user = stormbringer
force group = stormbringer
Now we completed the part of editing smb.conf
Save the file and close gedit.
Since we are going to share the folder with other users we should now make sure that the permissions are set. Type:
Code:
sudo chmod 0777 /media/samba
NOTE: Don't forget to correct the path to the location you chose above!
That's it - now we need to start samba ...
1.1 Starting samba and setting up user accounts
Let us fire up samba for the first time. Type:
Code:
sudo /etc/init.d/samba start
There shouldn't be any errors - if you are presented with an error message make sure everything is correct (search for typos and/or invalid paths).
Time to add yourself as an samba user.
NOTE: You will be asked for a password - make sure you use the same as you use for login!
Code:
sudo smbpasswd -L -a your_username
sudo smbpasswd -L -e your_username
In case you need other users to be able to access the share you need to add them to your system AND samba as well. Make sure you use the very same Windows usernames and passwords!
NOTE: Windows XP doesn't set passwords for its useraccount per default. If you haven't set a password on your XP box just press enter when prompted to enter a password for the user account you're about to create!
In the following example we will add an user called "mark" ...
Example:
Code:
sudo useradd -s /bin/true mark
sudo smbpasswd -L -a mark
sudo smbpasswd -L -e mark
The "-s /bin/true" in the first line prevents the users from being able to access the commandline of your linux box ("-s" stands for "shell"). I strongly advise you to follow this recommendation! Don't change that setting to a valid login-shell unless you really know what you are doing!
Repeat this step until you configured all user accounts!
Now that we configured samba and created the user accounts we are done with the Linux-part - there's one more thing to do in Windows.
2. Changing network settings in Windows
Now we should let Windows know that there's a WINS server active in the network.
If you had to change "wins support" to "no" above skip this step!
- Click "START"
- Click "Control Panel"
- Click "Network Connections"
- Find your "LAN Connection"
- Right-click the icon and select "Properties"
- Select the "TCP/IP" Protocol and click the "Properties" button
- Click "Advanced"
- Select the third Tab entitled "WINS"
- Click "Add"
- Type in the ip-address of your Linux box
- Click "Add"
- Select "Use NetBIOS over TCP/IP"
- Click "OK"
- Click "OK"
- Click "OK"
- Reboot Windows
Upon reboot you may now map the network drive within Windows.
With WINS enabled:
- Click "START"
- Right-click "My Computer"
- Select "Map network drive"
- Choose the drive letter
- Type \\DAPPER\MyFiles
NOTE: Adjust this to the hostname and sharename you chose above!
- Click "Finish"
With WINS disabled:
- Click "START"
- Right-click "My Computer"
- Select "Map network drive"
- Choose the drive letter
- Type \\<ip-address>\MyFiles
NOTE: To find out the ip-address of your Linux box type "ifconfig" inside a terminal and find the ip for the correct interface (i.e. eth0). Don't forget to adjust the sharename to the name you chose above.
- Click "Finish"
That's it - samba is up and running now.
3. Security consideration
This is the right time to think about security right away.
In case your computer has more than one network connection (i.e. wired and wireless ethernet) you may want to restrict access to samba.
If not especially configured samba will bind its service to all available network interfaces.
So, let us assume you only want your wired network to have access and that the network card is called eth0.
Add the following lines to the [general] section of your smb.conf to achieve that goal:
Code:
interfaces = lo, eth0
bind interfaces only = true
If you did it correctly it should look similar to this:
Code:
[global]
; General server settings
netbios name = YOUR_HOSTNAME
server string =
workgroup = YOUR_WORKGROUP
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
interfaces = lo, eth0
bind interfaces only = true
Now only the local loopback interface (dubbed "lo") and eth0 are able to access samba - there's no need to fear that someone might break into your system by wireless as the interface isn't bound to the service.
4. Final words
If you happen to have any questions feel free to ask - I'll try to help as soon as possible.
If you find any mistakes in this howto please let me know so that I can fix them.
Feel free to contribute and suggest - help to make this howto a better guide.
5. Addendum: Useful links
Here are some links you may find useful.
The onsite links refer to other samba-guides and to ubuntu_daemon's "Important Links" thread.
- Onsite
Ubuntu Help: Windows Networkworking
Ubuntu Documentation: Setting up Samba
READ THIS FIRST prior to posting - IMPORTANT links (by ubuntu_daemon)
The offsite links refer to the offical Samba homepage and to a selected choice of their official documentation; these links are useful if you like to dig yourself into the mysteries of samba's configuration and usage as well as troubleshooting problems.
- Offsite
Samba Homepage
Practical Exercises in Successful Samba Deployment
The Official Samba-3 HOWTO and Reference Guide
Using Samba, 2nd Edition
-
1 Attachment(s)
Re: HOWTO: Setup Samba peer-to-peer with Windows
stormbringer, wonderful guide you have created, I have a few questions though.
you say that you will make this guide more thorough later to include DHCP with samba. is that going to happen any time soon or have you not planned it yet?
also, please look at my attachment, it's a drawing of the way my network is physically setup. i just want to know if my network is safe. i use my windows desktop's shared folder as my backup folder, the folder where i backup all of my ubuntu stuff on it. my smb.conf is as generic as it can be, and i don't have a shared folder on my ubuntu desktop because i can browse, save, write to, and delete files on my windows desktop's shared folder. it never asks me for a password or anything on ubuntu. i just go to places, network servers, and go into my windows desktop's shared folder.
is it me, or does that just not sound safe at all?!
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by erik1397
you say that you will make this guide more thorough later to include DHCP with samba. is that going to happen any time soon or have you not planned it yet?
Well - this HOWTO was a piece of cake as it aims at simple home usage. but ...
The "second part" of the guide (I guess I'll call it "HOWTO: Setup Samba as an PDC with additional services") is planned, in the early stage of becoming, but won't happen soon (read: within a couple of a few days) as it's even more complex to write.
The aim will be professional usage of Ubuntu/Samba in Office-, School- or Corporate environments (as a replacement for Windows Servers) - therefore I will need to include basic guides on how to configure DHCP, DNS and NTP to play nice altogether.
If you like to proof-read or contribute the one or another idea I'll PM you the "development draft" as it gets complete.
Quote:
Originally Posted by erik1397
also, please look at my attachment, it's a drawing of the way my network is physically setup. i just want to know if my network is safe.
By looking at the drawing it looks good ... but ...
In case you have neighbors within the reach of your wireless router I hope you at least enabled encryption (WEP, 128-Bit minimum) so that no one can abuse your internet connection or exploit your data.
Quote:
Originally Posted by erik1397
I can browse, save, write to, and delete files on my windows desktop's shared folder. it never asks me for a password or anything
Do you need to enter a password upon bootup of Windows?
If you need to enter a password to log into Windows then Ubuntu has saved your password in the keyring - you must not enter it anew upon connect to the shared folder.
If Windows (XP?) doesn't ask you for a password you better set one right away (START -> Control Panel -> User Accounts).
Running around without an password makes it easy to gain access to your system and data. Every scriptkiddy that's within the reach of your wireless router and able to use a wireless sniffer may gain access in a matter of minutes (that's no fiction but a fact unless you use WPA or WPAv2 encryption on your wireless link).
Storm.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by Stormbringer
Well - this HOWTO was a piece of cake as it aims at simple home usage. but ...
The "second part" of the guide (I guess I'll call it "HOWTO: Setup Samba as an PDC with additional services") is planned, in the early stage of becoming, but won't happen soon (read: within a couple of a few days) as it's even more complex to write.
The aim will be professional usage of Ubuntu/Samba in Office-, School- or Corporate environments (as a replacement for Windows Servers) - therefore I will need to include basic guides on how to configure DHCP, DNS and NTP to play nice altogether.
If you like to proof-read or contribute the one or another idea I'll PM you the "development draft" as it gets complete.
thanks for that info, and no i don't need the develpoment draft, but thank you for the offer (as i'm extremely horrible when it comes to samba!)
Quote:
Originally Posted by Stormbringer
By looking at the drawing it looks good ... but ...
In case you have neighbors within the reach of your wireless router I hope you at least enabled encryption (WEP, 128-Bit minimum) so that no one can abuse your internet connection or exploit your data.
yes i do have 128-bit encryption on my router
Quote:
Originally Posted by Stormbringer
Do you need to enter a password upon bootup of Windows?
no...
Quote:
Originally Posted by Stormbringer
If you need to enter a password to log into Windows then Ubuntu has saved your password in the keyring - you must not enter it anew upon connect to the shared folder.
If Windows (XP?) doesn't ask you for a password you better set one right away (START -> Control Panel -> User Accounts).
i just made one!
Quote:
Originally Posted by Stormbringer
Running around without an password makes it easy to gain access to your system and data. Every scriptkiddy that's within the reach of your wireless router and able to use a wireless sniffer may gain access in a matter of minutes (that's no fiction but a fact unless you use WPA or WPAv2 encryption on your wireless link).
even if you have wep encryption on your router?
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by erik1397
even if you have wep encryption on your router?
WEP has a known design flaw in the encryption algorithm - by capturing raw pakets with an wireless sniffer (AirSnort and other auditing tools like this) you are able to "sniff" the encryption key in use.
Using 128-Bit WEP encryption will only make it a little more harder to sniff the key, but not impossible (in the end it's the software that's doing all the rocket-science for you).
- If your wireless router has an option to allow only specific MAC addresses use this option to tighten your security (input the MAC addresses of all your wireless cards). It won't protect you if the MAC gets faked by an attacker, but it's an additional step to make your wireless radio a little more secure.
- DISABLE the broadcast of your ESSID (that's the ID of the wireless router) - it'll be harder to find by using sniffers if it's "stealth" (not announcing itself to the rest of the world next to you). If you need to connect a new device you should know the name (ID) of your wireless router - so you're able to input it.
Being a little paranoid when it comes to wireless ethernet is always a good idea.
Storm.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Thanks for posting this, Stormbringer. Thank you also for your suggestion in the other Samba topic, although for the time being my network is made up of all trusted users (immediate family) and has no wireless access, so I do not see a security risk in allowing everyone on the LAN to see my (fairly unimportant) shared files. I should have been more specific before.
Finally, I was curious what the security advantage would be in having the "hosts allow" parameter within the share definitions versus within the global section. I understand the utility of per-share usergroup permissions. Again, thank you for helping out people like me who are inexperienced with Samba.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by Stormbringer
WEP has a known design flaw in the encryption algorithm - by capturing raw pakets with an wireless sniffer (AirSnort and other auditing tools like this) you are able to "sniff" the encryption key in use.
Using 128-Bit WEP encryption will only make it a little more harder to sniff the key, but not impossible (in the end it's the software that's doing all the rocket-science for you).
- If your wireless router has an option to allow only specific MAC addresses use this option to tighten your security (input the MAC addresses of all your wireless cards). It won't protect you if the MAC gets faked by an attacker, but it's an additional step to make your wireless radio a little more secure.
- DISABLE the broadcast of your ESSID (that's the ID of the wireless router) - it'll be harder to find by using sniffers if it's "stealth" (not announcing itself to the rest of the world next to you). If you need to connect a new device you should know the name (ID) of your wireless router - so you're able to input it.
Being a little paranoid when it comes to wireless ethernet is always a good idea.
Storm.
okay, i did disable the ESSID, but the mac address thing is a little iffy. In my router settings, I found a "MAC Address Clone" tab, and in it, it says: "In this page, you can change the WAN MAC address of this router.
User Defined WAN MAC Address: 00.00.00.00.00.00"
how am i supposed to input all of my MAC addresses when I can only input one?!
Also, how do I find my wireless devices' MAC addresses?
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by Arisna
Finally, I was curious what the security advantage would be in having the "hosts allow" parameter within the share definitions versus within the global section. I understand the utility of per-share usergroup permissions. Again, thank you for helping out people like me who are inexperienced with Samba.
The advantage is that you can control which clients, or network, will be allowed to connect to the share in question. Hosts that don't fall into allowed-list are not able to log into the service - even if they provide valid user credentials.
It may not be that important in a typical home-setup, but it makes some sense if you run samba on a multi-homed (server with several network-cards) system.
Hope this clarifies your question.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by erik1397
okay, i did disable the ESSID, but the mac address thing is a little iffy. In my router settings, I found a "MAC Address Clone" tab, and in it, it says: "In this page, you can change the WAN MAC address of this router.
Don't touch this setting! It's related to the WAN interface (the interface that connects your router to the internet).
BTW: What make (manufacturer) and model is your router?
Quote:
Originally Posted by erik1397
Also, how do I find my wireless devices' MAC addresses?
In Windows (2000/XP) open the command prompt and type
> ipconfig /all
Find the Network Interface that represents your Wireless radio and write down the "Hardware address" (consists of 8 pairs of Hex-values).
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by Stormbringer
BTW: What make (manufacturer) and model is your router?
it is a linksys
BEFW11S4 wireless-B broadband router (it's one of the older kinds)
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
This is by far the best guide I have seen. It worked on the first try and without a reboot. I have been struggling with samba for some time now and this guide is great. Thanks.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
awesome tuttorial mate
keep it up, very good work done
keep more like this cumming
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Thanx Stormbringer, we need more penguins like u. This is the simplest & best howto by far. I got samba working 1st time and without reboot.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Thanks for all your cheers ... I'm glad the guide works out that smoothly as it has been a rather quick edit.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Hi,
Firstly many thanks for the how-to it looks awesome . .and have printed it off allready!!
I just wondered if I could ask a stupid question as there is something that I havnt quite understood (about samba, not from your tut), and that is about the passwords.
Quote:
Originally Posted by Stormbringer
[b]
-> force user = YOUR_USERNAME
-> force group = YOUR_USERNAME
Well, this should say it all. Replace "YOUR_USERNAME" with the name you use for login (no spaces!).
Example:
force user = stormbringer
force group = stormbringer
Am i putting in the passwords for the Linux account? :oops:
I get a little confused as I know samba can take the password from the windows logon session (i think) . . and this can somehow be used to tie into a user of matching name on the linux system
For instance i want to make my home directory viewable and writable by me. . and have it password protected, but how would I do this?
hope they arn't too stupid a question to ask, and once again thanks for the how-to
/Matt
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by mwells
I just wondered if I could ask a stupid question as there is something that I havnt quite understood (about samba, not from your tut), and that is about the passwords.
Am i putting in the passwords for the Linux account? :oops:
In the section you quoted from my howto you have to put in your username - not your password!
Code:
force user = mwells
force group = mwells
This assumes your useraccount on windows AND linux is actually called "mwells". Please change it to your setting.
Quote:
Originally Posted by mwells
I get a little confused as I know samba can take the password from the windows logon session (i think) . . and this can somehow be used to tie into a user of matching name on the linux system
Add your useraccount to samba (the smbpasswd thing) and Samba should grant your Windows box access automatically!
Just to stress it once again - this'll only work if both useraccounts on both computers and both OS's have the very same username/password combo. If this isn't the case then it won't work out automatically.
Quote:
Originally Posted by mwells
For instance i want to make my home directory viewable and writable by me. . and have it password protected, but how would I do this?
REMOVE the semicolons from the lines in the [homes] section (in smb.conf, everything that is written after a semicolon is considered to be a remark) ... make it look like the following example ...
Code:
[homes]
valid users = %S
create mode = 0600
directory mode = 0755
browseable = no
read only = no
veto files = /*.{*}/.*/mail/bin/
Quote:
Originally Posted by mwells
hope they arn't too stupid a question to ask
From my point of view "stupid questions" don't exist --- no one know about everything...
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
ah sorry, i meant the username, my bad.
And thanks very much for the quick reply, that helped me out a lot.
So just to clarify, if there is a user 'mwells' on linux with password 'x', and a user with exactly the same credentials on a windows box they would sail straight in . .but if the user on windows had the same name but no (or a different password), would they then get a password prompt when trying to connect to the home file?
Also the create_mode and directory mode, is it a correct assumption to make that these place the writes on the files/directories created by the accessing user? and what would the %S rule give for valid users?
Once again, many many thanks for your help .. I realise i am being increadably lazy not reseaching this myself!
/Matt
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by mwells
ah sorry, i meant the username, my bad.
No problem ...
Quote:
Originally Posted by mwells
So just to clarify, if there is a user 'mwells' on linux with password 'x', and a user with exactly the same credentials on a windows box they would sail straight in.
Yap - Windows (XP) should be able to find the shared folders of your Linux box as well as your home directory automatically in the Network Neighborhood as long as both users have the same login-credentials and as long as both computers are inside the very same workgroup (sorry, forgot to mention this).
Quote:
Originally Posted by mwells
but if the user on windows had the same name but no (or a different password), would they then get a password prompt when trying to connect to the home file?
If the user has the same name but no, or different, password, Windows _should_ prompt you for the password.
Quote:
Originally Posted by mwells
Also the create_mode and directory mode, is it a correct assumption to make that these place the writes on the files/directories created by the accessing user? and what would the %S rule give for valid users?
The "create mode" and "directory mode" lines are meant to keep the modes of the files nicely ... without these, Windows would create files and directories as 775 / 775 (rwxrwxr-x).
The default directory mode - inside of /home/<username> - is 755, and having mere datafiles executable by default wouldn't make much sense.
%S hold the username of the connection - so you will automatically connected to the right user-home.
Quote:
Originally Posted by mwells
I realise i am being increadably lazy not reseaching this myself!
In case you like to do some research: man smb.conf ;-)
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Great guide,
Dont know if anyone stumbled across this problem but i was trying to share a folder with a space in the name. "//RON/iTunes Music" is the path to the folder i was trying to access from my linux box. I couldnt get it to work with the space; however, i found after some searching that samba accepts "\040" without quotes, as a space!
So if you want to share a folder with a space try it like this //RON/iTunes\040Music and you should be good to go.
Hope that helps somebody
-The King
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Alternatively you may put the UNC-Path inside of Quotes to make it work...
i.e. "\\RON\iTunes Music"
Example from within the command-line of Windows
net use x: "\\RON\iTunes Music" /persistent:yes
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
I'm now fully networked, write access and all, with my brother's PC. All thanks to the help recieved here, giving me the courage and the knowledge to get my hands dirty and actually set this up, where normally I would rely entirely on automated installers.
I doubt I'd be able to articulate how to do all this to anyone else, over the phone or 'net, but if anyone ever asked me to go over to their house to set up an XP/Ubuntu network I know I'd be able to do so with confidence.
I just wanted to say thank you to all the people involved in this thread for sharing your knowledge and being patient with our problems :)
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
So ah... didnt work.
I followed the instructions. When I go to map network drive on my winXP box, it looks but doesnt find anything. Im (really really) sure I have the ip address right and the share name right.
Could it be that I'm trying to share /home/share ? I tried changing some things according to the Wiki to be able to read/write home directories, but still, the samba share isnt being seen by my xp computer.
My xp account is Matt, and the account on my ubuntu machine is matt, with different passwords. I added matt, Matt, and just to be safe MATT, as samba users, still no effect.
I feel like I'm missing something... any clues?
Thanks
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
AsYouWish
My xp account is Matt, and the account on my ubuntu machine is matt, with different passwords. I added matt, Matt, and just to be safe MATT, as samba users, still no effect.
Having different passwords across two machines for the same useraccount is a most common pitfall.
You added the useraccount to Samba (btw: there's no need for Upper-/Lowercase as Windows ignores the cases in a standard setup - so simply delete the ones having different spelling to the one of your Linux box) --- but with WHICH password?
- If you gave the user the password of your Linux box it's the wrong one. Change it with smbpasswd to the correct one.
- If you gave the user the password of your Windows box it's the right one and everything _should_ work ok.
Samba not displaying anything usually means...
...the user isn't enabled on the Linux box (sudo smbpasswd -e <username>)
...the password of the user accounts don't match.
...that one of the systems is inside the wrong workgroup.
That's all I can think of by looking at your post.
-Storm
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Ok so... that didnt work. Here is my smb.conf. I've tried several differnt version but this is straight from your howto.
My smb.conf:
Code:
[global]
; General server settings
netbios name = server
server string =
workgroup = mshome
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast
wins support = yes
printing = CUPS
printcap name = CUPS
syslog = 1
syslog only = yes
; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
;valid users = %S
;create mode = 0600
;directory mode = 0755
;browseable = no
;read only = no
;veto files = /*.{*}/.*/mail/bin/
; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no
; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no
; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775
[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no
; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
;path = /media/cdrom
;browseable = yes
;read only = yes
;guest ok = yes
[Files]
path = /media/share/
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0755
force user = matt
force group = matt
So my ubuntu acct is matt with password1 and my winxp accoutn is Matt with password2. I set and enabled user 'matt' with password2 in smbpasswd. Still nothing. When I enter \\192.168.1.102\Files I get a pause, and then a 'could not be located' error.
Does it matter Im running this on a PPC?
Does it matter that \media\share is not actual media but just a dir I created?
Does it matter that i'm setting this up via VNC to desktop 1 (not 0)
Argh. Sorry to be a pain. Thanks.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Your smb.conf looks fine - and it shouldn't matter that you're running Ubuntu PPC.
Try the following command inside a Terminal ...
# smbclient -L localhost -U%
When asked for a password you need to type "password2".
If the command returns an error you either entered the wrong password or there's something fishy with your samba setup. You should see something like this ...
Code:
Domain=[STORMBRINGER] OS=[Unix] Server=[Samba 3.0.22-Ubuntu]
Sharename Type Comment
--------- ---- -------
netlogon Disk Network Logon Service
print$ Disk Printer Drivers
IPC$ IPC IPC Service (nebuchanezzar)
ADMIN$ IPC IPC Service (nebuchanezzar)
Domain=[MSHOME] OS=[Unix] Server=[Samba 3.0.22-Ubuntu]
Server Comment
--------- -------
NEBUCHADNEZZAR
Workgroup Master
--------- -------
STORMBRINGER NEBUCHADNEZZAR
If you get a result similar to the one from right above then samba is running and doing fine.
If not, let's see if Windows is freaking out...
Try to ping your Windows box from Linux and vice versa just to make absolutely sure that you're network connection is fine.
If this works please take a look into the Firewall control panel in Windows and make sure that the firewall is either disabled or "File- and Printersharing" is allowed to pass through the firewall.
Try to disable "Require SignOrSeal" (encrypted smb-connections) in Windows XP ...
To make this an easy job simply paste to following lines into notepad and save it as DisableReqSignOrSeal.reg (or any filename you like)
Code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters]
"requiresignorseal"=dword:00000000
Open the location where you saved the file, double-click, and confirm the dialog.
Reboot and try again...
It should be sufficient to paste this line into any open Explorer windows: \\192.168.1.102\Files
If it still doesn't work, try to connect to the share from the command-line:
net use x: \\192.168.1.102\Files password2 /user:matt /persistent:yes
Try these steps and tell me how it turned out.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Yeah... I'm a retard. Forgot about ZoneAlarm... silently blocking me from the outside world. Couldnt ping the XP box from Ubuntu so I added 192.168.1.100-110 to the trusted zone and bingo. Fully functional.
Thanks so much.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Well first of all I would like to say thank you very much for this post!!:KS
But Im haveing a few issues that I can't quite solve. I can ping my linux box from a windows box and vice versa, but I can't exchange any data or map a drive. I tried everything in your post, but I still get, from both boxes, that permission is required.:-k Here is my output when I type
smbclient -L localhost -U%
Domain=[WINBLOWS] OS=[Unix] Server=[Samba 3.0.22]
Sharename Type Comment
--------- ---- -------
ADMIN$ IPC IPC Service ()
IPC$ IPC IPC Service ()
MyFiles Disk
print$ Disk
Domain=[WINBLOWS] OS=[Unix] Server=[Samba 3.0.22]
Server Comment
--------- -------
DARE-DEVIL
Workgroup Master
--------- -------
WINBLOWS DARE-DEVIL
and this is my smb.cfg file setup
[global]
; General server settings
netbios name = dare-devil
server string =
workgroup = WINBLOWS
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
;interfaces = lo, eth0
;bind interfaces only = true
passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast
wins support = yes
printing = CUPS
printcap name = CUPS
syslog = 1
syslog only = yes
; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
;valid users = %S
;create mode = 0600
;directory mode = 0755
;browseable = no
;read only = no
;veto files = /*.{*}/.*/mail/bin/
; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = dare-devil
;valid users = %U
;read only = no
; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no
; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775
[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no
;Uncomment if you need to share your CD-/DVD-ROM Drive
[DVD-ROM Drive]
path = /media/dvd-rw
browseable = yes
read only = yes
guest ok = yes
[MyFiles]
path = /home/dare-devil/
browseable = yes
read only = yes
guest ok = yes
create mask = 0644
directory mask = 0755
force user = dare-devil
force group = WINBLOWS
Any help would be greatly appreciated Storm!! Again thanks so much for your time you have put into making this post.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Ok, let's see if we can get your problem solved ...
- About the "permission is required" thing:
What's the exact error message and what do you do to get it?
- About your smb.conf
Wait a sec; what's that?
Code:
[MyFiles]
path = /home/dare-devil/
browseable = yes
read only = yes
guest ok = yes
create mask = 0644
directory mask = 0755
force user = dare-devil
force group = WINBLOWS
Are you trying to share your home directory? That won't work out that way.
EDIT What's the "force group" ??? "WINBLOWS"? All uppercase? That looks dead wrong unless you created such a group yourself.
Code:
force user = dare-devil
force group = dare-devil
Would be more right.
/EDIT
If you like to "share" your home, then you should do it that way instead ...
Code:
[global]
; General server settings
netbios name = dare-devil
server string =
workgroup = WINBLOWS
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
;interfaces = lo, eth0
;bind interfaces only = true
passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast
wins support = yes
printing = CUPS
printcap name = CUPS
syslog = 1
syslog only = yes
; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
[homes]
valid users = %S
create mode = 0600
directory mode = 0755
browseable = no
read only = no
veto files = /*.{*}/.*/mail/bin/
; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = dare-devil
;valid users = %U
;read only = no
; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no
; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775
[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no
;Uncomment if you need to share your CD-/DVD-ROM Drive
[DVD-ROM Drive]
path = /media/dvd-rw
browseable = yes
read only = yes
guest ok = yes
The difference is that I enabled the [homes] section and removed the share you declared at the bottom of the file.
If the directory in question (/home/dare-devil) *IS NOT* the home directory of a valid user account but a badly placed data directory you like to share on the network you may have an issue with the filesystem permissions.
# sudo chmod 0777 /home/dare-devil
# sudo chown dare-devil.dare-devil /home/dare-devil
Again - DO NOT ALTER the permissions if it's the home directory of a valid user account! You may break your local login.
You've been warned.
Restart samba (sudo /etc/init.d/samba restart) and map your home-directory (commandline example):
net use h: \\dare-devil\dare-devil your_password /user:dare-devil /persistent:yes
Awaiting your answer ...
-Storm
-
3 Attachment(s)
Re: HOWTO: Setup Samba peer-to-peer with Windows
Ok...thanks for the quick reply, I expected it to be a day or two!!
Anyhow, in response, yes WINBLOWS is the name of the WORKGROUP I created on my windows box, and I just thought it would keep things simple if I used that as my force group. Did I figure wrong in my understanding of how this all works? I am new to samba, so i really appreciate all your help.
Yes, /home/dare-devil is the home directory of a valid user account. I would like to share the whole directory, and I only want to share it with my home network not anything outside of it. I would like to be able to uncomment out the following so I can use your suggestion.
;interfaces = lo, eth0
;bind interfaces only = true
Do these lines have anything to do with preventing me from being able to use the connection?
As for the exact error message I get here is the screen dump for you.
Ohh and it seems that I already kinda bokre my login on my linux box, because it was telling me that I shouldn't be sharing my home folder or something like that ahhhh](*,)
Thanks again for any, and all your help, it reall is appreciated storm, your're a great penguin!
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
PENGUIN-PC
Ok...thanks for the quick reply, I expected it to be a day or two!!
Anyhow, in response, yes WINBLOWS is the name of the WORKGROUP I created on my windows box, and I just thought it would keep things simple if I used that as my force group. Did I figure wrong in my understanding of how this all works? I am new to samba, so i really appreciate all your help.
The "force group" parameter inside the definition of the share DOES NOT, i repeat: DOES NOT, refer to a Windows-Workgroup but to the group of the local useraccount(s) on your Linux box.
So, "force group" should contain the same definition as "force user". But as you only like to share your home you won't need to bother with this directive.
Quote:
Originally Posted by
PENGUIN-PC
Yes, /home/dare-devil is the home directory of a valid user account. I would like to share the whole directory, and I only want to share it with my home network not anything outside of it. I would like to be able to uncomment out the following so I can use your suggestion.
Kill the share you added at the bottom of the file and remove the comments at the [homes] section (remove the ";" at the beginning of the lines).
Quote:
Originally Posted by
PENGUIN-PC
;interfaces = lo, eth0
;bind interfaces only = true
Do these lines have anything to do with preventing me from being able to use the connection?
Nope - the lines just tell samba to which network interfaces the daemon should bind by default; if it isn't specified it will bind to *any* available interface that is up.
This is a very useful directive if your box has multiple interfaces (i.e. 2 network cards, wireless, firewire, bluetooth, and so on). By giving the names of the interfaces the daemon will only bind to the ones you configured; the ones not specified will be leaved out.
Quote:
Originally Posted by
PENGUIN-PC
As for the exact error message I get here is the screen dump for you.
You actually can share your home directory ([homes] section of smb.conf), but trying it the way you did may lead to severe problems.
Quote:
Originally Posted by
PENGUIN-PC
Ohh and it seems that I already kinda bokre my login on my linux box, because it was telling me that I shouldn't be sharing my home folder or something like that ahhhh](*,)
That's what the screenshot of the nautilus error-message suggests.
Please type
# ls -lisa /home
# ls -lisa /home/dare-devil
inside a terminal and paste the output into a post.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
WOW, ok I hope your ready for this. Here it is
dare-devil@DARE-DEVIL:~$ ls -lisa /home
total 12
3244033 4 drwxr-xr-x 3 root root 4096 2006-05-16 04:41 .
2 4 drwxr-xr-x 21 root root 4096 2006-07-12 16:56 ..
3244035 4 drwxrwxrwx 67 dare-devil dare-devil 4096 2006-07-18 12:30 dare-devil
dare-devil@DARE-DEVIL:~$ ls -lisa /home/dare-devil
total 700
3244035 4 drwxrwxrwx 67 dare-devil dare-devil 4096 2006-07-18 12:30 .
3244033 4 drwxr-xr-x 3 root root 4096 2006-05-16 04:41 ..
3739484 4 drwxr-xr-x 13 dare-devil dare-devil 4096 2006-07-15 10:18 Applications
3768336 4 drwxr-xr-x 2 dare-devil dare-devil 4096 2006-05-04 18:07 ARCADE
3248758 4 -rw-r--r-- 1 dare-devil dare-devil 1302 2006-07-13 03:28 .audacity
3310341 4 drwxr-xr-x 2 dare-devil dare-devil 4096 2006-07-11 01:41 .avidemux
3244176 12 -rw------- 1 dare-devil dare-devil 10149 2006-07-18 13:19 .bash_history
3244037 4 -rw-r--r-- 1 dare-devil dare-devil 220 2006-05-16 04:41 .bash_logout
3244038 4 -rw-r--r-- 1 dare-devil dare-devil 414 2006-05-16 04:41 .bash_profile
3244039 4 -rw-r--r-- 1 dare-devil dare-devil 2227 2006-05-16 04:41 .bashrc3244154 4 drwxr-xr-x 4 dare-devil dare-devil 4096 2006-05-16 19:56 .bmp
3768363 4 drwxr-xr-x 6 dare-devil dare-devil 4096 2006-07-11 03:21 Business
3768413 4 drwxr-xr-x 5 dare-devil dare-devil 4096 2006-05-04 18:07 Cartoons
3244286 4 drwx------ 5 dare-devil dare-devil 4096 2006-05-24 12:35 .config3244248 36 -rw-r--r-- 1 dare-devil dare-devil 35240 2006-06-20 04:19 config.log
3244183 4 -rw-r--r-- 1 dare-devil dare-devil 39 2006-06-28 14:20 .current-song
3244117 4 drwxr-xr-x 2 dare-devil dare-devil 4096 2006-07-18 12:33 Desktop3244042 4 -rw------- 1 dare-devil dare-devil 26 2006-05-16 04:49 .dmrc
3653633 4 drwxr-xr-x 13 dare-devil dare-devil 4096 2006-05-17 14:58 DOC'S
3244668 4 drwxr-xr-x 4 dare-devil dare-devil 4096 2006-07-10 23:10 .dvdcss3310330 4 drwxr-xr-x 2 dare-devil dare-devil 4096 2006-07-10 23:10 .dvdrip3248756 24 -rw-r--r-- 1 dare-devil dare-devil 21716 2006-07-10 23:13 .dvdriprc
3653638 4 drwxr-xr-x 4 dare-devil dare-devil 4096 2006-05-17 14:26 DWG'S
3244056 4 -rw------- 1 dare-devil dare-devil 16 2006-05-16 04:49 .esd_auth
868391 4 drwxr-xr-x 8 dare-devil dare-devil 4096 2006-07-17 12:16 .evolution
3277212 4 drwxr-xr-x 10 dare-devil dare-devil 4096 2006-06-02 13:49 exaile
3278005 4 drwxr-xr-x 4 dare-devil dare-devil 4096 2006-06-02 14:04 .exaile3244036 0 lrwxrwxrwx 1 dare-devil dare-devil 26 2006-05-16 04:41 Examples -> /usr/share/example-content
3248847 4 -rw-r--r-- 1 dare-devil dare-devil 1043 2006-05-25 03:36 .face
3768626 4 drwxr-xr-x 6 dare-devil dare-devil 4096 2006-05-22 07:24 Flicks
3248859 16 -rw-r--r-- 1 dare-devil dare-devil 12569 2006-07-15 10:00 .fonts.cache-1
3277447 4 drwx------ 4 dare-devil dare-devil 4096 2006-07-09 21:55 .gaim
3244043 4 drwx------ 5 dare-devil dare-devil 4096 2006-07-18 12:30 .gconf
3244044 4 drwx------ 2 dare-devil dare-devil 4096 2006-07-18 13:21 .gconfd3279927 4 drwxr-xr-x 21 dare-devil dare-devil 4096 2006-07-17 04:02 .gimp-2.2
3244162 0 -rw-r----- 1 dare-devil dare-devil 0 2006-07-18 10:56 .gksu.lock
3244161 4 drwxr-xr-x 3 dare-devil dare-devil 4096 2006-05-16 17:35 .gnome
3244046 4 drwx------ 16 dare-devil dare-devil 4096 2006-07-18 11:05 .gnome23244047 4 drwx------ 2 dare-devil dare-devil 4096 2006-05-16 04:49 .gnome2_private
3278255 4 drwx------ 4 dare-devil dare-devil 4096 2006-06-21 06:53 .gnomesword-2.0
3244057 4 drwxr-xr-x 2 dare-devil dare-devil 4096 2006-05-23 18:47 .gstreamer-0.10
3739486 4 drwxr-xr-x 2 dare-devil dare-devil 4096 2006-05-17 11:22 .gstreamer-0.8
3248905 4 -rw------- 1 dare-devil dare-devil 59 2006-06-11 18:35 .gtk-bookmarks
3244354 4 drwxr-x--- 2 dare-devil dare-devil 4096 2006-07-18 00:08 .gtk-gnutella
3244359 4 drwxr-xr-x 5 dare-devil dare-devil 4096 2006-05-16 20:20 gtk-gnutella-downloads
3244058 4 -rw-r--r-- 1 dare-devil dare-devil 92 2006-05-16 04:49 .gtkrc-1.2-gnome2
3424312 4 drwxr-xr-x 2 dare-devil dare-devil 4096 2006-05-17 14:50 GUI's
3244462 4 -rw-r--r-- 1 dare-devil dare-devil 32 2006-05-24 17:23 .hwdb
3249087 4 -rw------- 1 dare-devil dare-devil 2323 2006-07-18 12:30 .ICEauthority
3277169 4 drwxr-xr-x 2 dare-devil dare-devil 4096 2006-06-01 12:09 .icons
3277598 4 drwxr-xr-x 3 dare-devil dare-devil 4096 2006-05-24 13:32 .java
3278350 4 drwx------ 3 dare-devil dare-devil 4096 2006-06-27 05:59 .kde
3248946 220 -rwxr-xr-x 1 dare-devil dare-devil 217311 2006-06-20 04:19 libtool3293951 4 drwxr-xr-x 3 dare-devil dare-devil 4096 2006-06-28 14:21 .listen1900657 4 drwxr-xr-x 3 dare-devil dare-devil 4096 2006-05-17 12:20 .local
3244463 4 drwx------ 3 dare-devil dare-devil 4096 2006-05-16 20:56 .macromedia
3244257 4 -rw-r--r-- 1 dare-devil dare-devil 2094 2006-05-24 17:14 .mailcap
3278385 4 drwxr-xr-x 3 dare-devil dare-devil 4096 2006-06-27 06:10 .mcop
3248985 4 -rw------- 1 dare-devil dare-devil 31 2006-06-28 10:58 .mcoprc3244112 4 drwx------ 3 dare-devil dare-devil 4096 2006-05-16 04:49 .metacity
3244045 4 drwx------ 4 dare-devil dare-devil 4096 2006-05-17 12:56 .mozilla
3244204 4 drwxr-xr-x 2 dare-devil dare-devil 4096 2006-05-16 17:48 .mplayer
3244200 4 drwxrwxrwx 181 dare-devil dare-devil 4096 2006-06-08 18:10 MUSIC
3244116 4 drwxr-xr-x 3 dare-devil dare-devil 4096 2006-05-16 04:49 .nautilus
868388 4 drwxr-xr-x 20 dare-devil dare-devil 4096 2006-05-17 14:41 Old Engineering stuff
3277304 4 drwx------ 3 dare-devil dare-devil 4096 2006-07-15 10:48 .openoffice.org2
3244877 4 drwxr-xr-x 2 dare-devil dare-devil 4096 2006-05-04 18:01 PDF'S
3294171 4 drwxr-xr-x 3 dare-devil dare-devil 4096 2006-06-28 19:48 Photos
3244880 4 drwxr-xr-x 11 dare-devil dare-devil 4096 2006-06-20 02:27 PICS
3293955 4 drwxr-xr-x 2 dare-devil dare-devil 4096 2006-06-28 14:14 Podcasts
3278348 4 drwxr-xr-x 2 dare-devil dare-devil 4096 2006-06-27 06:11 .qt
3293357 4 drwxr-xr-x 4 dare-devil dare-devil 4096 2006-07-17 05:51 .quodlibet
3245318 4 drwxr-xr-x 2 dare-devil dare-devil 4096 2006-07-02 18:27 Random Stuff
3248889 36 -rw------- 1 dare-devil dare-devil 34653 2006-05-24 17:27 .realplayerrc
3244228 20 -rw------- 1 dare-devil dare-devil 17267 2006-07-18 05:00 .recently-used
3245325 4 drwxr-xr-x 5 dare-devil dare-devil 4096 2006-05-17 15:40 RioSSeries
3245330 4 drwxr-xr-x 5 dare-devil dare-devil 4096 2006-05-04 18:02 School
3739281 4 drwxr-xr-x 3 dare-devil dare-devil 4096 2006-05-04 18:02 screen savers
3276888 4 drwxr-xr-x 3 dare-devil dare-devil 4096 2006-05-23 18:27 .subversion
3244163 0 -rw-r--r-- 1 dare-devil dare-devil 0 2006-05-16 04:51 .sudo_as_admin_successful
3278312 4 drwx------ 4 dare-devil dare-devil 4096 2006-06-21 06:53 .sword
3277168 4 drwxr-xr-x 2 dare-devil dare-devil 4096 2006-06-01 12:09 .themes3244134 4 drwx------ 4 dare-devil dare-devil 4096 2006-05-17 12:12 .thumbnails
3244115 4 drwx------ 4 dare-devil dare-devil 4096 2006-07-18 06:06 .Trash
3244111 4 drwx------ 2 dare-devil dare-devil 4096 2006-05-16 04:49 .update-notifier
3293584 4 drwxr-xr-x 3 dare-devil dare-devil 4096 2006-07-17 08:34 .vlc
3244443 4 drwxr-xr-x 2 dare-devil dare-devil 4096 2006-06-27 05:11 .wapi
3248751 4 -rw-r--r-- 1 dare-devil dare-devil 4 2006-05-17 12:15 .windows-label
3739417 4 drwxr-xr-x 4 dare-devil dare-devil 4096 2006-07-15 10:23 .wine
3244424 4 -rw------- 1 dare-devil dare-devil 121 2006-07-18 04:31 .Xauthority
3244203 4 drwxr-xr-x 2 dare-devil dare-devil 4096 2006-05-17 00:06 .xine
3739387 4 drwxr-xr-x 7 dare-devil dare-devil 4096 2006-05-04 18:03 XLS'S
3244120 4 drwxr-xr-x 4 dare-devil dare-devil 4096 2006-05-16 17:41 .xmms
3244040 4 -rw-r--r-- 1 dare-devil dare-devil 1322 2006-07-18 13:17 .xsession-errors
dare-devil@DARE-DEVIL:~$
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
I set everything up step by step and I can;t get to my windows boxes from Xubuntu. I keep getting an error dialog box with: "smb:///" is not a valid location. This is when I'm trying to browse the network.
Here's my samaba config:
[global]
; General server settings
netbios name = laptop
server string =
workgroup = WORKGROUP
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast
wins support = no
printing = CUPS
printcap name = CUPS
syslog = 1
syslog only = yes
; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
;valid users = %S
;create mode = 0600
;directory mode = 0755
;browseable = no
;read only = no
;veto files = /*.{*}/.*/mail/bin/
; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no
; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no
; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775
[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no
; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
;path = /media/cdrom
;browseable = yes
;read only = yes
;guest ok = yes
[MyFiles]
path = /home/Share/
browseable = yes
read only = no
guest ok = yes
create mask = 0644
directory mask = 0755
force user = michael
force group = michael
then there's this:
michael@laptop:~$ smbclient -L localhost -U%
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.22]
Sharename Type Comment
--------- ---- -------
print$ Disk
MyFiles Disk
IPC$ IPC IPC Service ()
ADMIN$ IPC IPC Service ()
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.22]
Server Comment
--------- -------
GATEWAY2000
LAPTOP
SARASUSAN Punkie's Mommie
Workgroup Master
--------- -------
WORKGROUP LAPTOP
As far as I can tell Samba is seeing everything like it should, but I can'te tell what's going on...
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Ok, so far the permissions look good ... just switch the permissions of your home directory back to default:
chmod 0770 /home/dare-devil
As for the smb.conf ... if you followed all the other steps (creating samba user accounts) the following conf should do the trick for you:
Code:
[global]
; General server settings
netbios name = dare-devil
server string =
workgroup = WINBLOWS
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
;interfaces = lo, eth0
;bind interfaces only = true
passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast
wins support = yes
printing = CUPS
printcap name = CUPS
syslog = 1
syslog only = yes
[homes]
valid users = %S
create mode = 0600
directory mode = 0755
browseable = no
read only = no
veto files = /*.{*}/.*/mail/bin/
; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = dare-devil
;valid users = %U
;read only = no
; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no
; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775
[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no
;Uncomment if you need to share your CD-/DVD-ROM Drive
[DVD-ROM Drive]
path = /media/dvd-rw
browseable = yes
read only = yes
guest ok = yes
In Gnome press ALT+F2 (Run Application), type
gksudo /etc/samba/smb.conf
and paste the lines from above into the file or do the modifications by hand. Save the file, open a terminal and restart samba to make changes happen (sudo /etc/init.d/samba restart). Maybe it's a good idea to reboot your Windows box as well.
To get access to the home directory from Windows:
\\dare-devil\dare-devil
If that doesn't work try to subsitute the name of your Linux box with its ip-address (type ifconfig inside a terminal)
\\192.168.0.11\dare-devil
THIS IS AN EXAMPLE - REPLACE WITH >>>YOUR<<< IP-ADDRESS !!!
(somehow a thought of a long time ago creeps through the dark edges of my memories that windows may dislike the fact that the system and username is identical)
If my fear is right, then try to change the name you configured in samba to i.e.:
netbios name = devilbox
Restart samba and try to make the connection again.
Try this and report back.
Oh, and thanks for the cheers ... your sister is right; Austria is a nice country to spend your holidays.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
mmcclure79
I set everything up step by step and I can;t get to my windows boxes from Xubuntu. I keep getting an error dialog box with: "smb:///" is not a valid location. This is when I'm trying to browse the network.
This rather sounds like some package is missing in your installation of Ubuntu.
As I have no experience with XUbuntu (running a fully fleged install of Ubuntu 6.06 AMD64) I'm only able to guess ...
Try to install "smbfs"...
sudo apt-get install smbfs
...and see if things work out. Chances are that the network browser may need that package to be installed.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
STORM YOU ARE AMAZING!!!! Everything works just fine now! The user name and system name being the same was not a problem. I can't thank you enough! I was able to transfer files back and forth to both computers without any troubles at all. Now I guess I need to understand how all this worked. Cheers!!
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
PENGUIN-PC
STORM YOU ARE AMAZING!!!! Everything works just fine now! The user name and system name being the same was not a problem. I can't thank you enough! I was able to transfer files back and forth to both computers without any troubles at all.
As usual I'm honored I could be of help.
Quote:
Originally Posted by
PENGUIN-PC
Now I guess I need to understand how all this worked. Cheers!!
If you really like to dig yourself into the mysteries of samba start by reading the man-page (type "man smb.conf" inside a terminal) or take a look into Samba's website; lots of resources can be found there.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Hi,
I know you already answered this kind of question ... but it's still not clear for me.
Let say I have a desktop running Ubuntu and a laptop running XP.
If I understand well I need to have the same login/passwd for my desktop and laptop to access the share folders through samba ???
That could be easy if the desktop and the laptop have the same real user ... but what if the user are different (and then want to create different user accounts, logins, passwd...) or if you have several laptops connected to the desktop...
Sorry if you think that my questions are irrelevant...I definitely need some sleep.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
I followed all the steps but samba still doesnt seem to be cooperating. In windows when I try to map the drive using \\roxxor\home\kateandalex\sharedsamba it just keeps on prompting me for user name and password, it doesnt say if its wrong or right, just keeps bringing up the same thing, both machines are able to ping each other as well. Any help would be greatly appreciated. Also as a side note in the force user and force group could you just add more people by seperating them with ; so they would all be able to access the same share? smbclient -L localhost -U% only gives me:
cpk1@roxxor:/etc/samba$ smbclient -L roxxor -U%
Domain=[TEAMAWESOME] OS=[Unix] Server=[Samba 3.0.22]
tree connect failed: NT_STATUS_LOGON_FAILURE
Also testparm gives me this
cpk1@roxxor:/etc/samba$ testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[print$]"
Processing section "[printers]"
Processing section "[roxxorshared]"
Loaded services file OK.
WARNING: passdb expand explicit = yes is deprecated
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
workgroup = TEAMAWESOME
server string =
null passwords = Yes
passdb backend = tdbsam
username map = /etc/samba/smbusers
syslog only = Yes
announce version = 5.0
name resolve order = hosts wins bcast
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = CUPS
wins support = Yes
valid users = %S
read only = No
create mask = 0600
printing = cups
print command =
lpq command = %p
lprm command =
veto files = /*.{*}/.*/mail/bin/
browseable = No
[print$]
path = /var/lib/samba/printers
write list = root
read only = Yes
create mask = 0664
directory mask = 0775
guest ok = Yes
browseable = Yes
[printers]
path = /tmp
guest ok = Yes
printable = Yes
[roxxorshared]
path = /home/alexandkate/sambashared
force user = alexandkate
force group = alexandkate
create mask = 0644
browseable = Yes
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
Turtle.net
Hi,
I know you already answered this kind of question ... but it's still not clear for me.
Let say I have a desktop running Ubuntu and a laptop running XP.
If I understand well I need to have the same login/passwd for my desktop and laptop to access the share folders through samba ???
No, you mustn't have the same login/password - it's just a recommendation to keep things simple.
Only IF you have the same useraccounts on, to follow your example, your desktop and laptop life would be a lot easier if both accounts would have the same passwords.
Quote:
Originally Posted by
Turtle.net
That could be easy if the desktop and the laptop have the same real user ... but what if the user are different (and then want to create different user accounts, logins, passwd...) or if you have several laptops connected to the desktop...
Samba is a _server_ daemon --- where's the problem?
Just add the required useraccounts with their respective passwords by using smbpasswd and you're all set (we're using TDBSAM as our backend for user accounting; not Linux's shadow). Additionally you may need to make sure that the access right(s) to the share(s) (located in smb.conf) will fit.
Any specific scenario you are thinking about?
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
cpk1
I followed all the steps but samba still doesnt seem to be cooperating. In windows when I try to map the drive using \\roxxor\home\kateandalex\sharedsamba<snip>
The mapping is wrong ...
Could I bug you to try again with: \\roxxor\roxxorshared
You need to use the name of the share as you specified inside the brackets...
[roxxorshared] <--- THIS ONE HERE!!!
path = /home/alexandkate/sambashared <--- *NOT* THIS!!!
force user = alexandkate
force group = alexandkate
create mask = 0644
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
thank you for the quick reply, unfortunatly \\roxxor\roxxorshared gets the same result =\
edit: sorry i forgot to mention i have swat installed but am not using it, but i am under the impression it wont change my .conf file unless i access the webpage?
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Wait a moment ... I overlooked this one here ...
Code:
cpk1@roxxor:/etc/samba$ smbclient -L roxxor -U%
Domain=[TEAMAWESOME] OS=[Unix] Server=[Samba 3.0.22]
tree connect failed: NT_STATUS_LOGON_FAILURE
AND
Code:
cpk1@roxxor:/etc/samba$ testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[print$]"
Processing section "[printers]"
Processing section "[roxxorshared]"
Loaded services file OK.
WARNING: passdb expand explicit = yes is deprecated
The first error message usually only shows up when a firewall (do you have Firestarter running?) is blocking the traffic or if eth0 and/or lo isn't up.
EDIT: Did you add AND enable your useraccount in samba (NT_STATUS_LOGON_FAILURE)?
The second error message is new to me ... did you specify that parameter inside your smb.conf (testparm doesn't show everything)? Hmm ... need to look into this.
Please post the whole contents of your smb.conf!
And about the access rights ...
force group and force user has NOTHING to do with access rights to the share; it has to do with local filesystem permissions! The parameter you were thinking about is "valid users" (valid users = user1, user2, user3 ...)
Without specifying "valid users =" ALL authenticated users will be able to access the share.
-Storm
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
here is my full conf
cpk1@roxxor:/etc/samba$ cat smb.conf
[global]
; General server settings
netbios name = ROXXOR
server string =
workgroup = TEAMAWESOME
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast
wins support = yes
printing = CUPS
printcap name = CUPS
syslog = 1
syslog only = yes
; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
valid users = %S
create mode = 0600
directory mode = 0755
browseable = no
read only = no
veto files = /*.{*}/.*/mail/bin/
; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no
; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no
; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775
[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no
; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
;path = /media/cdrom
;browseable = yes
;read only = yes
;guest ok = yes
[roxxorshared]
path = /home/alexandkate/sambashared
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0755
force user = alexandkate
force group = alexandkatecpk1@roxxor:/etc/samba$
not sure which account you mean when you say useraccount, i had alexandkate added and enabled when i first went through and just now added cpk1, still same output from smbclient -L roxxor -U% no firewall that I can see on ps aux, plus i think it would be blocking apache and mysql if there was one running. once again thank you for your direct help!
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
good news! got rid of everything and tried going through it all again and it worked! I think trying to use swat might have messed things up? That or I just made a typo/mistake and didnt notice it. I wasnt able to map the drive in windows by start > right click my computer > map network drive. I just found my linux box in network places and mapped it from there, login worked and everything! thank you for the help and the well written guide!
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
Stormbringer
No, you mustn't have the same login/password - it's just a recommendation to keep things simple.
Only IF you have the same useraccounts on, to follow your example, your desktop and laptop life would be a lot easier if both accounts would have the same passwords.
Ok, now I think I understand the trick with the accounts.
On my home network I have a desktop (running ubuntu only) and a laptop (running XP and ubuntu in dual boot).
On my laptop, I have the same login/pswd for ubuntu and for XP (let say it's lap/xxx) and on my desktop i have the following login/pswd : desk/yyy.
My problem is : I can access the share folder I created on my desktop from my laptop under ubuntu ... but not under XP (same IP for XP and ubuntu on the laptop btw).
I really don't understand. Just to be sure I removed the firewall on my XP box ... and nothing changed.
Do you think the problem can be caused by the fact that XP is a smb server by itself ?
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
I have done a little bit of XP network configuration using the XP's network wizard, and I disabled all the shared folders ... then suddenly the shared folder from my desktop appeared.
So the problem was really to have XP as a smb server on the same network.
Looks like my problem is solved ;)
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
hi Stormbringer
tnx 4 givin such a good help.
u make samba so easy dat any novice user can configure it .
bt i hv 1 doubt dat i want to add group.
i hv tried dat with followin commands
groupadd -r groupname
adduser -r -g trust -d/dev/null/-s/dev/null compname$
which we always use in redhat linux
bt. not workin in ubuntu
and 1 more thing i wanna make MSHOME as domain rather than workgroup.
what changes i hv to make in smb.conf?
i tried dat with
domain master = yes
bt. not getin.
pls........... help me out.
tnx
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
I've just found this thread & wanted to say thank you :-)
You've just solved 25% of my ubuntu issues & made me look really clever in front of my boss. :-D :-D
Cheers!
Justice
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Worked great for me :-) only question is how does one tie in a mac into this server (seeing as mac sort of runs on unix)?
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Hi stormbringer, and thanks already for the howto. It worked great a few days ago when i followed it. I'm using vmware to emulate a virtual machine with windows xp on it, and I was mapping driver E:\ as my linux home directory. It was ok, no problems.
Still, after a few days it stopped working and I still don't know why. I'm using my pc about 3 times a week, all I've been doing is mostly those kubuntu critical updates, and I'm not sure if I changed my password.
I thought this password problem was the issue, but still to make sure it worked again i decided to run the howto all over again.
checked samba install, stopped daemon, overwritten smb.conf with yours and reconfigured it again, pointing the samba path to /home/my_user. reconfigured windows on it too, removed that netbios-wins support thingy and added my ip again, but no luck. The DAPPER network computer is detected, MyFiles folder is detected, they always are, but when I try to map a drive to it, it says (after a few seconds attemping to connect)
"The mapped network drive could not be created because the following error has occured: An extended error has occurred."
The error is different when the daemon is stopped, so I assume it has something to do with the configuration.
What am I doing wrong? Sorry for the extended crying for help :p Thanks in advance.
PS: I have static ip address but sometimes it changes on ISP maitenance. I noticed the IP changed these past few days, but I've configured it again with the new IP.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
mac73
hi Stormbringer
tnx 4 givin such a good help.
u make samba so easy dat any novice user can configure it .
bt i hv 1 doubt dat i want to add group.
i hv tried dat with followin commands
groupadd -r groupname
adduser -r -g trust -d/dev/null/-s/dev/null compname$
which we always use in redhat linux
bt. not workin in ubuntu
and 1 more thing i wanna make MSHOME as domain rather than workgroup.
what changes i hv to make in smb.conf?
i tried dat with
domain master = yes
bt. not getin.
pls........... help me out.
tnx
Sorry for the late reply ... been a little busy lately.
The configuration variable "WORKGROUP =" >>> IS <<< the name of the Domain - t4|<3 4 l00|< 47 7|-|3 d0|<u 4|\|d l34|2|\| 70 3><p|2355 `/0u|2531f!
Oh --- and before you can add a user to some group you better create the group on the local system (groupadd).
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
core
The DAPPER network computer is detected, MyFiles folder is detected, they always are, but when I try to map a drive to it, it says (after a few seconds attemping to connect)
"The mapped network drive could not be created because the following error has occured: An extended error has occurred."
I love Microsoft's error messages; they are soooo informative.
As you are using VMware (no matter if it's Workstation or Server): did you install a kernel upgrade lately?
If the answer is yes, did you run "sudo vmware-config.pl" to compile the necessary modules for the new kernel? If the answer is no do it _right now_!
Otherwise ...
Please start up VMware, open a command prompt, and type:
ipconfig /all
Please post the output into a reply (or PM me if it's a public IP address).
Quote:
Originally Posted by
core
The error is different when the daemon is stopped, so I assume it has something to do with the configuration.
When samba is stopped you should get an error saying that the network path could not be found ... no wonder though.
-Storm
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Stormbringer. I just whant to say, Thanks for the howto
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
As you are using VMware (no matter if it's Workstation or Server): did you install a kernel upgrade lately? If the answer is yes, did you run "sudo vmware-config.pl" to compile the necessary modules for the new kernel? If the answer is no do it _right now_!
Yes, but i think samba stopped working before. After I updated the kernel, VMWare stopped working, so I ran vmware-config.pl again to compile it according to my current kernel.
But still, I did it again right now, restarted windows and still the same error appears.
Quote:
Otherwise ...
Please start up VMware, open a command prompt, and type:
ipconfig /all
Please post the output into a reply (or PM me if it's a public IP address).
I did so, check your PM inbox. Thanks!
Still, help from others are more than welcome.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
any idea why i cannot WRITE to my samba share?
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
verbatim210
any idea why i cannot WRITE to my samba share?
I bet the permissions of the folder/mountpoint in your local filesystem are wrong ...
sudo chmod 0777 /path/to/the/shared-folder
sudo /etc/init.d/samba restart
NOTE: DON'T CHANGE THE MOD OF YOUR HOME-DIRECTORY!
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
core
I did so, check your PM inbox. Thanks!
I wrote an reply to your message by PM as well ... please have a look at your inbox.
-Storm
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
Stormbringer
I bet the permissions of the folder/mountpoint in your local filesystem are wrong ...
sudo chmod 0777 /path/to/the/shared-folder
sudo /etc/init.d/samba restart
NOTE: DON'T CHANGE THE MOD OF YOUR HOME-DIRECTORY!
thanks storm
your bullet hit the dot!
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Only Samba HOWTO that worked for me.
Great job!
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
you sir/madam are my personal hero.
you LITERALLY saved my job. thank you.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
and just ran into my first snag. can't figure out how to add multiple users.
it works for the primary user on the system, but if i add users via the following example:
Code:
sudo useradd -s /bin/true NEW_USERNAME
sudo smbpasswd -L -a NEW_USERNAME
sudo smbpasswd -L -e NEW_USERNAME
i can't get the additional user to work.
for this section of my samba.conf file:
Code:
[MyFiles]
path = /media/samba/
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0755
force user = YOUR_USERNAME
force group = YOUR_USERGROUP
where do i add the additional user?
if i say "force user = YOUR_USERNAME NEW_USERNAME"
then no one can logon.
but if i configure it as follows:
Code:
force user = YOUR_USERNAME
force group = YOUR_USERGROUP
force user = NEW_USERNAME
force group = NEW_USERGROUP
where NEW_USERGROUP is the same as NEW_USERNAME.
then i can log on with the YOUR_USERNAME, but no one else works.
EDIT:
yeah so, i reread it and figured out that new users don't have to be added to the samba.conf file. i have two users working now :)
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
dmizer
EDIT:
yeah so, i reread it and figured out that new users don't have to be added to the samba.conf file. i have two users working now :)
Hi!
Just came across your post; sorry for the delay *gomen*
Glad you figured it out ... as it's just a matter of adding and enabling the user(s) with smbpasswd.
- Storm
P.S.: As the "force user" and "force group" parameter seems to cause confusion here's a general hint for everyone ...
The parameter refers to the user/group to whom the files inside the shared directories will belong; it has nothing to do with access rights/priviledges!
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
storm....you're the man!.....I 've just started using Ubuntu....you're howto is so easy to follow that I got file sharing working in the first pass!...cheers to you dude!
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
Stormbringer
Hi!
Just came across your post; sorry for the delay *gomen*
Glad you figured it out ... as it's just a matter of adding and enabling the user(s) with smbpasswd.
- Storm
P.S.: As the "force user" and "force group" parameter seems to cause confusion here's a general hint for everyone ...
The parameter refers to the user/group to whom the files inside the shared directories will belong; it has nothing to do with access rights/priviledges!
tondemonai.
it only took me about 20 minutes and a reread of your first post to figure it out on my own. and i actuall made good use of that "force user, force group" to resolve a problem with some sensitive "boss only" access files.
you really are the man. vielen dank!
edit:
actually, i went back through and figured out why i tripped up on adding new users. it's in this line:
Quote:
In case you need other users to be able to access the share you need to add them to your system AND samba as well. Make sure you use the very same Windows usernames and passwords!
so no problem adding them to my system, but when you say "AND samba" i assumed you meant samba.conf.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Hi :)
Thanks for this great howto!
It worked out just fine.
However I got a problem with the user permissions.
I want my brother to access his folder and I want myself to access my own, but neither one of us should see the content of the others folders.
The problem is that "force user" doesn't seem to work.
Everyone can view all the folders. I tried messing around with chmod and chown, but it doesn't work out.
I also set up the users on the linux machine and did everything according to the howto!
I don't know what to do anymore. I really need user permissions, since there are files that some people should not see.
Can someone help please?
Flo
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by Stormbringer;1319971
The parameter refers to the user/group to whom the files inside the shared directories will belong; [b
it has nothing to do with access rights/priviledges![/b]
Sorry, I just read your post after posting my last one!
I think I made that mistake as well.
Can you tell me than how I set up access permissions, like in windows, that would be very important!
Thanks in advance.
Flo
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
Flavian
Hi
Thanks for this great howto!
It worked out just fine.
However I got a problem with the user permissions.
I want my brother to access his folder and I want myself to access my own, but neither one of us should see the content of the others folders.
The problem is that "force user" doesn't seem to work.
Everyone can view all the folders. I tried messing around with chmod and chown, but it doesn't work out.
I also set up the users on the linux machine and did everything according to the howto!
I don't know what to do anymore. I really need user permissions, since there are files that some people should not see.
Can someone help please?
Flo
----------------------------------------
Sorry, I just read your post after posting my last one!
I think I made that mistake as well.
Can you tell me than how I set up access permissions, like in windows, that would be very important!
Thanks in advance.
Flo
OK - let us start this way: could you please tell me what shares you configured (i.e. include the part in question into a reply)? Would make life easier as I won't have to guess.
However, let's assume the following - maybe we get a direct hit:
You and your brother have a user account on your Linux box and you want to access the HOME directories (/home/<username>)
- Open smb.conf for editing
Either type "sudo gedit /etc/samba/smb.conf" in a terminal or press ALT+F2 and input "gksudo gedit /etc/samba/smb.conf".
- Find the following section:
Code:
; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
;valid users = %S
;create mode = 0600
;directory mode = 0755
;browseable = no
;read only = no
;veto files = /*.{*}/.*/mail/bin/
and change it to ...
Code:
; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
[homes]
valid users = %S
create mode = 0600
directory mode = 0755
browseable = no
read only = no
veto files = /*.{*}/.*/mail/bin/
- Save the changes
- Restart samba
Type "sudo /etc/init.d/samba restart" in a terminal
On Windows the shared home-directory (it's called by the username you have on your Linux box) should be automatically detected. If not, simply type \\<COMPUTERNAME>\<username> into the address bar of Windows Explorer - and if it doesn't work out by the name subsitute it with the ip address. Don't forget to input the correct credentials (username/password) when asked.
If you are running a different configuration I rely on your feedback ...
-Storm
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Hi Storm thanks for your quick reply!
Here's the deal ;)
My Network at home includes 3 Pcs and a server.
My brother: windows
My Dad: Windows
Me: Windows / Linux Hybrid
Since I use linux most of the time I was planning on just setting up normal shares for everyone (like I had it before when I had my windows server running) so everyone has his own area where he can store stuff and no one else but him can access it.
And than there is a global share called "Data" where I have stored all the programs, and installs (especially for windows) which me and my brother should have write permissions to, but my dead only read because he is very computer illiterate and I don't want him to mess up or delete files by accident.
So it was when I had set up the windows server and so I was thinking to do it with linux.
I have to say that I do not really understand the benefit of the /home directory thing.
AND the home directory is also on the system partition of the linux server, which means that I would have to move it one of the bigger HDDs in the server. (I could not find how to do that, so I stuck to the idea mentioned above, by just creating single shares)
I hope you could follow my description...
Here's my smb.conf:
Quote:
[global]
; General server settings
netbios name = SERVER
server string =
workgroup = WURM
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
passdb backend = tdbsam
security = user
null passwords = trues
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast
wins support = yes
printing = CUPS
printcap name = CUPS
syslog = 1
syslog only = yes
; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
;valid users = %S
;create mode = 0600
;directory mode = 0755
;browseable = no
;read only = no
;veto files = /*.{*}/.*/mail/bin/
; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no
; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no
; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775
[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no
; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
;path = /media/cdrom
;browseable = yes
;read only = yes
;guest ok = yes
############ Fileshares begin here #############
[Data]
path = /media/hdb1
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0750
[Florian]
path = /media/hdc1/Florian
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0750
force user = florian
force group = florian
[Lukas]
path = /media/hdc1/Lukas
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0750
force user = lukas
force group = lukas
[Hans-Jörg]
path = /media/hdc1/Hans-Jörg
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0750
force user = hans-jörg
force group = hans-joerg
Thanks for your nice help :)
Flo
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
Flavian
Here's my smb.conf:
null passwords = trues
TYPING MISTAKE ENCOUNTERED!!!!
Please correct it to read "true"
Quote:
Originally Posted by
Flavian
[Data]
path = /media/hdb1
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0750
Although you want ALL of your family to have access here you should set "force user" and "force group" to the user account with whom you usually work on your Ubuntu box - I assume it's yours ...
Please add...
force user = florian
force group = florian
As I already stated in the thread: the "force user" and "force group" parameter has nothing to do with access priviledges but with the permissions of the local linux filesystem. All authenticated users will have access here.
EDIT
Short explaination:
Setting a forced user/group will make sure that all files and folders will belong to the user that is working on the box - so you won't have any troubles accessing the files/folders from within Ubuntu.
To figure out the difference...
Do a
ls -lisa /media/hdb1/
and
ls -lisa /media/hdc1/Lukas
or
ls -lisa /media/hdc1/hans-joerg
The difference in the file permissions should be easily spotted.
/EDIT
Quote:
Originally Posted by
Flavian
[Florian]
path = /media/hdc1/Florian
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0750
force user = florian
force group = florian
To lock this share so that ONLY YOU will have access add the following line...
valid users = florian
Quote:
Originally Posted by
Flavian
[Lukas]
path = /media/hdc1/Lukas
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0750
force user = lukas
force group = lukas
Same here ... if ONLY lukas should have access add ...
valid users = lukas
Quote:
Originally Posted by
Flavian
[Hans-Jörg]
path = /media/hdc1/Hans-Jörg
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0750
force user = hans-jörg
force group = hans-joerg
Please refrain from using german umlauts - stick to plain ASCII (although Dapper supports UTF-8 without any hitches, at least for me, you better not try to trigger problems lurking in the dark corners). German Umlauts in the share declaration and/or path in the local filesystem may cause major issues. This, however, does not apply to the files you store on the share ... as long as >Windows< happily recognizes the correct characters you are fine.
Therefore, better delete the user account (from your system and with smbpasswd from samba) and make it up anew by writing is as "hans-joerg".
As soon as it's done add ...
valid users = hans-joerg
...to lock down the share for this user ONLY.
After you made the changes you need to restart samba (reloading doesn't always work out) --- sudo /etc/init.d/samba restart.
-Storm
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Thank you very much, Storm for your nice and easy to follow answer!
You said that I should not use German Umlauts, yepp I would love not to do so :D Since it's an annoying pain, BUT I read in your first post that one should use the exact same user name and password as used for the Windows Box.
Since I was so smart to put Hans-Jörg there, I thought it might not work out with the user / password checking.
If all else fails I would have to change the windows install on my Dad's laptop I suppose :)
Thank you very much for your help again.
Flo
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
Flavian
You said that I should not use German Umlauts, yepp I would love not to do so :D Since it's an annoying pain, BUT I read in your first post that one should use the exact same user name and password as used for the Windows Box.
Since I was so smart to put Hans-Jörg there, I thought it might not work out with the user / password checking.
Alright, if you already have the user account on your dad's Windows laptop then simply leave it as it is to spare you the hassle of reconfiguring the whole stuff.
Glad I could be of help once more.
Cheers,
Storm
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
One more little question left (sorry to bug you with that, but I am a real newbie to Linux :/ )
What do I do when I want to have
Lukas: read/write
Florian: read/write
Hans-Jörg: ONLY READ permissions
on [Data] ?
Thanks in advance.
Flo
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
Flavian
What do I do when I want to have
Lukas: read/write
Florian: read/write
Hans-Jörg: ONLY READ permissions
on [Data] ?
Uh, it starts to get tricky ... that's an option I never had to implement (not even in a corpoprate server setup) ... hmm ...
Try it that way (but write down the current mode and ownership in case it breaks something really badly):
sudo chmod 0774 /media/hdb1
sudo chown florian.lukas /media/hdb1
To my knowledge it should give "others" read-only rights ... not really sure if samba will honor that.
-
Re: HOWTO: Setup Samba peer-to-peer with Windows
gud day and amazing how-to stormbringer.
i read through this thread and cudnt figure out how to access my windows shares from the ubuntu box.
ps. i can access the ubuntu shares from the windows box.