jharlock
Posts: 7
Joined: Sat Oct 31, 2015 7:50 pm

Workgroup not listed in Samba config file

Sat Oct 31, 2015 8:07 pm

Hi

I'm pretty new to this, please be patient if I need an explanation on things you'd consider simple.

I'm trying to set up a file share on a pi using samba. I've already set one up and it works a treat. For some reason, using the same laptop (windows 7 pro) it just will not let me access the second pi I'm setting up.

The samba config file doesn't list the work group, even though it's listed in the normal place in the config file. I've listed in the [homes] section and tested with a sudo testparm -s just to see if it reads it and it does throw a message telling me that it's in there.

Whenever I try to access the pi via Windows it tells me that I either do ot have permission or loops asking for the password. If I try to map a drive then I enter it as username "raspberrypi/pi" to ensure the correct domain. The domain on the laptop is set to WORKGROUP, the same as listed in the config file.

Here's the config file, Im hoping that the reason it won't share is because the workgroup isn't listed and someone can either tell me why it's not listed (and help me get it listed) or tell me it's irrelevant and the issue is somewhere else.

Here's the config file details:

Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[pi]"
Processing section "[usb]"
Processing section "[itunes]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
server role = standalone server
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword: * %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
wins support = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb

[homes]
comment = Home Directories
valid users = @users
create mask = 0700
directory mask = 0700
browseable = No

[pi]
path = /home/pi
valid users = pi
read only = No
guest ok = Yes

[usb]
comment = hdd share
path = /mnt/disk2/
read only = No
create mask = 0777
directory mask = 0777
guest only = Yes
guest ok = Yes

[itunes]
path = /itunes
valid users = pi
read only = No
guest only = Yes
guest ok = Yes

As you can see, in the [global] section the workgroup isn't listed. It's driving me crazy and has been going on for about three days.

Any help is appreciated.

Thanks

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Workgroup not listed in Samba config file

Sun Nov 01, 2015 9:26 am

You'll need to add a stanza like

Code: Select all

[global]
        workgroup = WKGRPNAME
        netbios aliases = pi
        server string = pi
        log level = 1
        syslog = 0
        time server = Yes
        socket options = SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY
        printcap name = CUPS
        os level = 65
        domain master = no
        wins support = Yes
        veto files = /*.eml/*.nws/riched20.dll/*.{*}/
        kernel oplocks = no
        encrypt passwords = true
        passdb backend = tdbsam
        obey pam restrictions = yes
at the top of your smb.conf.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

jharlock
Posts: 7
Joined: Sat Oct 31, 2015 7:50 pm

Re: Workgroup not listed in Samba config file

Sun Nov 01, 2015 11:13 am

Hi and thanks Dougie.

I've cut and pasted your text straight in the smb.conf file, but still the workgroup line doesn't appear. I can see the other new lines in the conf file so it must be reading some of them.

I restarted samba with sudo service smbd restart and here's the test parm:

Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[pi]"
Processing section "[usb]"
Processing section "[itunes]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
netbios aliases = pi
server string = pi
server role = standalone server
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
time server = Yes
socket options = SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY
printcap name = CUPS
os level = 65
domain master = No
dns proxy = No
wins support = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb
veto files = /*.eml/*.nws/riched20.dll/*.{*}/

Any further ideas ?

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Workgroup not listed in Samba config file

Sun Nov 01, 2015 12:53 pm

Have you tried copying the .conf file from the pi that works to the pi that doesn't?

jharlock
Posts: 7
Joined: Sat Oct 31, 2015 7:50 pm

Re: Workgroup not listed in Samba config file

Sun Nov 01, 2015 1:31 pm

Yeah, still misses it out :(

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Workgroup not listed in Samba config file

Sun Nov 01, 2015 5:10 pm

Try using testparm to verify your smb.conf.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

jharlock
Posts: 7
Joined: Sat Oct 31, 2015 7:50 pm

Re: Workgroup not listed in Samba config file

Sun Nov 01, 2015 7:09 pm

Hi Dougie

I ran a testparm -s, is that different ? The results are pasted in my last post.

Thanks

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Workgroup not listed in Samba config file

Sun Nov 01, 2015 7:47 pm

-s just suppresses some of the output.

This is my complete smb.conf

Code: Select all

[global]
        workgroup = WORKGROUP
        netbios aliases = pi
        server string = pi
        obey pam restrictions = Yes
        syslog = 0
        time server = Yes
        socket options = SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY
        printcap name = CUPS
        os level = 65
        domain master = No
        wins support = Yes
        idmap config * : backend = tdb
        veto files = /*.eml/*.nws/riched20.dll/*.{*}/

[homes]
        comment = Home Directories
        valid users = %S
        read only = No
        create mask = 0644

[shared]
        path = /shared
        create mask = 0644
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

jharlock
Posts: 7
Joined: Sat Oct 31, 2015 7:50 pm

Re: Workgroup not listed in Samba config file

Mon Nov 02, 2015 7:08 am

Tried a testparm and it still doesn't show.

pi@raspberrypi ~ $ sudo testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[pi]"
Processing section "[usb]"
Processing section "[itunes]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
netbios aliases = pi
server string = pi
server role = standalone server
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
time server = Yes
socket options = SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY
printcap name = CUPS
os level = 65
domain master = No
dns proxy = No
wins support = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb
veto files = /*.eml/*.nws/riched20.dll/*.{*}/

[homes]
comment = Home Directories
valid users = @users
create mask = 0700
directory mask = 0700
browseable = No

[pi]
path = /home/pi
valid users = pi
read only = No
guest ok = Yes

[usb]
comment = hdd share
path = /mnt/disk2/
read only = No
create mask = 0777
directory mask = 0777
guest only = Yes
guest ok = Yes

[itunes]
path = /itunes
valid users = pi
read only = No
guest only = Yes
guest ok = Yes
pi@raspberrypi ~ $

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Workgroup not listed in Samba config file

Mon Nov 02, 2015 10:41 am

Code: Select all

[homes]
...
 valid users = %S
...
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

jharlock
Posts: 7
Joined: Sat Oct 31, 2015 7:50 pm

Re: Workgroup not listed in Samba config file

Tue Nov 03, 2015 7:12 pm

Hi Dougie

Changed the user setting as you said, restarted Samba and I can now view the folders.

Thank you very much for your patience and help, it's really appreciated

Cheers

Return to “Networking and servers”