links: |- index -|- home -| ubuntu [1] [2] [3] [4] [5] [6] *7* |- end
I have some windows computers connected to a local network, a LAN, and I want to share files, etc, with my ubuntu linux computer. There are lots of references online, but the steps I followed were as follows :-
Mainly from -
https://help.ubuntu.com/community/SettingUpSamba
we have the method to setup a samba client -
$ sudo aptitude install smbfs
After this it may be necessary to RE-BOOT ubuntu! Next is the WORKGROUP. In my case 'samba' used teh default workgroup of WORKGROUP, so it was necessary to adjust the samba.conf file, if you have the 'kate' editor installed, or any other editor of your choice, through :-
$ sudo kate /etc/samba/smb.conf
In the [global] section of this file, ensure :-
workgroup = MSHOME
or whatever your WORKGROUP is ... and RE-BOOT to set this new WORKGROUP name.
In my case the machine running ubuntu is called DELL02, thus when I 'View workgroup computers' in windows explorer (XP) I see -
BUT, at this stage not much is SHARED. When I double click on the DELL02 ICON, I only see -
Note, this 'expansion' of the 'samba' icon may fail in windows (XP) machines that are running IIS, and thus have a login procedure, but not always.
Sharing files and directories depends on the settings in the smb.conf file in /etc/samba, and
this page -
http://www.samba.org/samba/docs/using_samba/ch06.html
gives lots of details and examples.
First to compare their 'sample' to my current smb.conf file -
sample | ubuntu |
---|---|
[global] workgroup = METRAN encrypt passwords = yes wins support = yes log level = 1 max log size = 1000 read only = no [homes] browsable = no map archive = yes [printers] path = /var/tmp printable = yes min print space = 2000 [test] browsable = yes read only = yes path = /usr/local/samba/tmp |
[global] workgroup = MSHOME server string = %h server (samba, Ubuntu) dns proxy = no log file = /var/log/samba/log.%m max log size = 1000 syslog = 0 panic action = /usr/share/samba/panic-action %d encrypt passwords = true passdb backend = tdbsam obey pam restrictions = yes invalid users = root unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n \ *Retype\snew\s*\spassword:* %n\n \ *password\supdated\ssuccessfuly* pam password change = yes map to guest = bad user socket options = TCP_NODELAY usershare allow guests = yes [printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes guest ok = no read only = yes create mask = 0700 [print$] comment = Printer Driver path = /var/lib/samba/printers browseable = yes read only = yes guest ok = no |
Not the least, but note the difference in the spelling of 'browse-able' ;=)) The 'e' got lost in the 'sample'!
Note, as advised on the above link page, edits and saves of the smb.conf file are implemented almost immediately - say each 60 seconds - thus it is better to copy the smb.conf file to a temporary name, edit that, and after running 'testparm' on the new file, copy it over the smb.conf file. 'testparm in_file' will really only check and show the current parameters excluding all comments.
At present I am trying to connect my windows XP machine, dell01, to my ubuntu machine, dell02, over my LAN, but I am getting continual messages to the log file, /var/log/samba/log.dell01, of the form :
[2009/01/29 12:00:12, 0] auth/auth_util.c:create_builtin_administrators (792) create_builtin_administrators: Failed to create Administraor [2009/01/29 12:00:12, 0] auth/auth_util.c:create_builtin_users (758) create_builtin_users: Failed to create Users
So to try to SOLVE this first ;=)) A Yahoo! search for 'samba create_builtin_administrators failed' pulled up some 700 hits.
From : http://www.howtoforge.com/forums/archive/index.php/t-18996.html
who had the same problem, and he shared some of his smb.conf changes -
## Browsing/Identification ### # Change this to the workgroup/NT-domain name your Samba server will part of workgroup = mydomain.tld ####### Authentication ####### # "security = user" is always a good idea. This will require a Unix account # in this server for every user accessing the server. See # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html # in the samba-doc package for details. security = share # Zeus Shared Folder [Shared] comment = Zeus Shared Folder writable = yes locking = no path = /Shared public = yes browseable = yes read_only = no guest ok = yes
But the reply asked him to check $ ls -l /etc/samba/smbpasswd, BUT such a file does not yet
exist on my system. Should I create one? How? From : http://susewiki.org/index.php?title=Setting_up_Samba
I can see the smb.conf entry -
passdb backend = smbpasswd
while I am using -
passdb backend = tdbsam
but I have no 'tdbsam' file either???
Made the following changes, well mostly additions to my /etc/samba/smb.conf file -
[global] wins support = yes security = share passdb backend = smbpasswd [homes] comment = Home Directories browseable = no read only = no create mask = 0755 directory mask = 0755 [test] comment = A Test shared folder browseable = yes read only = no locking = no writable = yes path = /usr/local/samba/tmp public = yes guest ok = yes
This got something happening. At least now my 'Network Places' in XP showed :-
which is a VAST improvement ;=)) And placing a file in there in ubuntu, I could copy and read that ubuntu file in XP, but was still not able to copy a file XP -> ubuntu, with an error permission denied!
Why? I added 'writable'! What else do I need to do to allow file copies from XP to samba???
AND, an etc/samba/smbpasswd appeared, but only with rw------- (0600) permissions. I chmod-ed it to 0666 (rw-rw-rw-) as was suggested in some of the posts read. But this does nothing, because it seems the next time 'samba' (or others) access this file it is set back to 0600!
And the Administrator and User error messages to the log file seem to have stopped. The last entry was [2009/01/29 15:34:19, 0] ... (Connection reset by peer), but this was to client. -1, so maybe 'samba' made this mistake!
I briefly set the 'log level = 3', but got so many confusing messages in the log that I reduced it to 2 shortly after, hoping this would give some information, but not excessive...
None at this time...