Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to configure samba, to be browseable every user on LAN??
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
rado3105
Apprentice
Apprentice


Joined: 14 Jul 2007
Posts: 293

PostPosted: Fri Mar 21, 2008 10:39 am    Post subject: How to configure samba, to be browseable every user on LAN?? Reply with quote

I have local network: 192.168.76.0/24, almost every user on LAN is windows user, I want files on my linux notebook(ubuntu) to be shared amongst all user on LAN. If they put in windows explorer(or in total commander my ip address: 192.168.76.99, they will get on my shared folders without any autorization.
Could you help, I tried it many ways but it didn´t help.

My smb.conf is:
Code:

[global]
netbios name = R-C-LAPTOP
server string = CAD architects, Stockholm. East 32nd st, 34th floor
workgroup = RCLAN-RUDINA
security = share
hosts allow = 127. 192.168.0.
interfaces = 127.0.0.1/8 192.168.0.0/24
remote announce = 192.168.0.255
remote browse sync = 192.168.0.255
printcap name = /etc/printcap
load printers = yes
cups options = raw
printing = cups
guest account = smbguest
log file = /var/log/samba/samba.log
max log size = 1000
null passwords = no
username level = 8
password level = 8
encrypt passwords = yes
unix password sync = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
local master = no
domain master = no
preferred master = no
domain logons = no
os level = 33
logon drive = m:
logon home = \\%L\homes\%u
logon path = \\%L\profiles\%u
logon script = %G.bat
time server = no
name resolve order = wins lmhosts bcast
wins support = no
wins server =
wins proxy = no
dns proxy = no
preserve case = no
client use spnego = no
client signing = no
client schannel = no
server signing = no
server schannel = no
nt pipe support = yes
nt status support = yes
allow trusted domains = no
obey pam restrictions = yes
enable spoolss = yes
client plaintext auth = no
disable netbios = no
follow symlinks = no
update encrypted = yes
pam password change = no
passwd chat timeout = 120
hostname lookups = no
username map = /etc/samba/smbusers
smb passwd file = /etc/samba/smbpasswd
passwd program = /usr/bin/passwd '%u'
passwd chat = *New*password* %n\n *ReType*new*password* %n\n *passwd*changed*\n
add user script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null '%u'
add user to group script=/usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g' '%u'
add group script = /usr/sbin/groupadd '%g'
delete user script = /usr/sbin/userdel '%u'
delete user from group script = /usr/sbin/userdel '%u' '%g'
delete group script = /usr/sbin/groupdel '%g'
add machine script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M '%u'
machine password timeout = 120
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /dev/null
winbind use default domain = yes
winbind separator = @
winbind cache time = 360
winbind trusted domains only = yes
winbind nested groups = no
winbind nss info = no
winbind refresh tickets = no
winbind offline logon = no

[public]
comment = disk-D
path = /media/sda5
public = yes
writable = no



[homes]
comment = Home Directories
path = /home
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
public = no
printable = no
share modes = no
locking = no

[netlogon]
comment = Network Logon Service
path = /home/netlogon
read only = no
available = yes
browseable = yes
writable = no
guest ok = no
public = no
printable = no
share modes = no
locking = no

[profiles]
comment = User Profiles
path = /var/samba/profiles
read only = no
available = yes
browseable = no
writable = yes
guest ok = no
public = no
printable = no
locking = no
create mode = 0600
directory mask = 0700

[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
writable = no
guest ok = no
public = no
printable = yes
share modes = no
locking = no

[pdf-documents]
path = /home/pdf-documents
comment = Converted PDF Documents
available = yes
browseable = yes
writeable = yes
guest ok = yes

[pdf-printer]
path = /tmp
comment = PDF Printer Service
printable = yes
guest ok = yes
use client driver = yes
printing = bsd
print command = /usr/bin/gsambadpdf %s %u
lpq command =
lprm command =
Back to top
View user's profile Send private message
guruvan
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2007
Posts: 132

PostPosted: Fri Mar 21, 2008 5:07 pm    Post subject: Reply with quote

Code:
hosts allow = 127. 192.168.0.
interfaces = 127.0.0.1/8 192.168.0.0/24
remote announce = 192.168.0.255
remote browse sync = 192.168.0.255


this does not match the network number you posted above: 192.168.76.0/24

they can't get to you at all
looks like it should be:
Code:
hosts allow = 127.0.0.1 192.168.76.0/24
interfaces = 127.0.0.1/8 192.168.76.99/24
remote announce =
remote browse sync = 


if all the clients are local to this lan segment (not across a router boundary) you don't need the remote lines
_________________
Everything is broken......(b.dylan). 8)

guruvan
Back to top
View user's profile Send private message
rado3105
Apprentice
Apprentice


Joined: 14 Jul 2007
Posts: 293

PostPosted: Fri Mar 21, 2008 6:28 pm    Post subject: re Reply with quote

Still doesn´t work(I can´t connect to ubuntu computer/192.168.76.99) from e.g: windows xp computer(192.168.76.88). On that ubuntu computer I have windows xp and linux and when I get to windows xp, i can connect to shared files on that computer e.g. from that other xp machine(192.168.76.88).
There is no router between these computers, their interfaces are bridged.
Don´t know what to do I tried almost everything. Here is my new smb.conf(also doesn´t work):
Code:
[global]
netbios name = R-C-LAPTOP
server string = CAD architects, Stockholm. East 32nd st, 34th floor
workgroup = RCLAN-RUDINA
security = ads
hosts allow = 127.0.0.1 192.168.76.0/24
interfaces = 127.0.0.1/8 192.168.76.99/24
remote announce =
remote browse sync =
printcap name = /etc/printcap
load printers = yes
cups options = raw
printing = cups
guest account = smbguest
log file = /var/log/samba/samba.log
max log size = 1000
null passwords = no
username level = 8
password level = 8
encrypt passwords = yes
unix password sync = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
local master = no
domain master = no
preferred master = no
domain logons = no
os level = 33
logon drive = m:
logon home = \\%L\homes\%u
logon path = \\%L\profiles\%u
logon script = %G.bat
time server = no
name resolve order = wins lmhosts bcast
wins support = no

wins proxy = no
dns proxy = no
preserve case = no
client use spnego = no
client signing = no
client schannel = no
server signing = no
server schannel = no
nt pipe support = yes
nt status support = yes
allow trusted domains = no
obey pam restrictions = yes
enable spoolss = yes
client plaintext auth = no
disable netbios = no
follow symlinks = no
update encrypted = yes
pam password change = no
passwd chat timeout = 120
hostname lookups = no
username map = /etc/samba/smbusers
smb passwd file = /etc/samba/smbpasswd
passwd program = /usr/bin/passwd '%u'
passwd chat = *New*password* %n\n *ReType*new*password* %n\n *passwd*changed*\n
add user script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null '%u'
add user to group script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g' '%u'
add group script = /usr/sbin/groupadd '%g'
delete user script = /usr/sbin/userdel '%u'
delete user from group script = /usr/sbin/userdel '%u' '%g'
delete group script = /usr/sbin/groupdel '%g'
add machine script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M '%u'
machine password timeout = 120
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /dev/null
winbind use default domain = yes
winbind separator = @
winbind cache time = 360
winbind trusted domains only = yes
winbind nested groups = no
winbind nss info = no
winbind refresh tickets = no
winbind offline logon = no

[homes]
comment = Home Directories
path = /home
read only = yes
available = yes
browseable = yes
writable = no
guest ok = yes
public = yes
printable = yes
share modes = yes
locking = no

[netlogon]
comment = Network Logon Service
path = /home/netlogon
read only = no
available = yes

writable = no
guest ok = no
public = no
printable = no
share modes = no
locking = no

browsable = yes
[profiles]
comment = User Profiles
path = /var/samba/profiles
read only = no
available = yes

writable = yes
guest ok = no
public = no
printable = no
locking = no
create mode = 0600
directory mask = 0700

browsable = no
[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
writable = no
guest ok = no
public = no
printable = yes
share modes = no
locking = no

[pdf-documents]
path = /home/pdf-documents
comment = Converted PDF Documents
available = yes
guest ok = yes
browsable = yes
public = yes
writable = no

[pdf-printer]
path = /tmp
comment = PDF Printer Service
printable = yes
guest ok = yes
use client driver = yes
printing = bsd
print command = /usr/bin/gsambadpdf %s %u
lpq command =
lprm command =

[sda5]
path = /media/sda5
comment = Multimedia
available = yes
browsable = yes
public = yes
writable = yes

[r-c]
path = /home/r-c
available = yes
browsable = yes
public = yes
writable = no
Back to top
View user's profile Send private message
guruvan
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2007
Posts: 132

PostPosted: Fri Mar 21, 2008 7:35 pm    Post subject: Reply with quote

you can ping the samba host from the windows boxen? if so, give me a little bit & I'll try with my rig.
_________________
Everything is broken......(b.dylan). 8)

guruvan
Back to top
View user's profile Send private message
rado3105
Apprentice
Apprentice


Joined: 14 Jul 2007
Posts: 293

PostPosted: Fri Mar 21, 2008 9:22 pm    Post subject: Reply with quote

I changed the smb.conf like this:

Code:
[global]
workgroup = RCLAN-RUDINA
netbios name = R-C-LAPTOP
security = share
hosts allow = 127.0.0.1 192.168.76.0/24
interfaces = 127.0.0.1/8 192.168.76.99/24 

[data]
comment = Data
path = /media/sda5
read only = Yes
guest ok = Yes


I can connect to R-C-LAPTOP(192.168.76.99) from windows it shows me shared directory(/media/sda5), but when I click on that directory I can´t open(it writes you have no privilegs to access the directory)
Back to top
View user's profile Send private message
guruvan
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2007
Posts: 132

PostPosted: Fri Mar 21, 2008 10:23 pm    Post subject: Reply with quote

I don't think I've used security = share before

Code:

SMB.CONF(5)

The default is security = user, as this is the most common setting needed when talking to Windows 98 and Windows NT.


if you have a copy of smbclient on the linux machine you could use that to see more explicitly what's happening

smbclient -I 192.168.76.99 -L R-C-LAPTOP -U username
this will list the IPC$ share (the list of netbios stuff the host in question knows, othe machines and local shares)

smbclient -I 192.168.76.99 -U username \\\\R-C-LAPTOP\\data
this will ask you for a passwd and list you see & work on the share


Code:
sally linux # smbclient -I 172.16.88.18 -U root \\\\mustang\\braingum
Password:
Domain=[MUSTANG] OS=[Unix] Server=[Samba 3.0.28]
smb: \> ls
  .                                   D        0  Thu Mar  6 21:32:20 2008
  ..                                  D        0  Thu Mar  6 01:42:00 2008
  $RECYCLE.BIN                        D        0  Mon Mar  3 22:23:11 2008
  INCOMING                            D        0  Thu Mar  6 21:34:58 2008
  System Volume Information           D        0  Tue Dec 11 06:43:38 2007
  tunes                               D        0  Fri Nov 23 10:12:16 2007
  video                               D        0  Wed Mar  5 03:01:53 2008

                41476 blocks of size 4194304. 1308 blocks available
smb: \>                                                                                 



I did the above from the command line on the actual samba server. (sally and mustang are the same box) (it's a linux/samba box and the share in question happens to be an ntfs partition.)

This is how I always test connections to/from windows & samba.

You can do similar from the windows hosts by using the
c:> net view \\HOST\share

net view /help should provide additonal switches.....(don't have a windows box up at the moment to double check syntax)
_________________
Everything is broken......(b.dylan). 8)

guruvan
Back to top
View user's profile Send private message
rado3105
Apprentice
Apprentice


Joined: 14 Jul 2007
Posts: 293

PostPosted: Sat Mar 22, 2008 8:47 am    Post subject: re Reply with quote

This works for me(the folders are browseable by anybody without any autorization)

Before changing config file you have to install samba-common

and also you have to create account/here in config is r-c)
sudo smbpasswd -L -a ubuntu_username (ubuntu_username = r-c in this config)
sudo smbpasswd -L -e ubuntu_username

Code:
[global]
    ; General server settings
    netbios name = R-C-LAPTOP
    server string = CAD architects Stockholm East 32nd st 34th floor
    workgroup = RCLAN-RUDINA
    announce version = 5.0
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

    passdb backend = tdbsam
    security = share
    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

[Disk-D]
    comment = Disk-D
    path = /media/sda5
    browseable = yes
    read only = no
    guest ok = yes
    create mask = 0644
    directory mask = 0755
    force user = r-c
    force group = r-c
    writable = no

[WesternD500]
 comment = WesternD500
    path = /media/WesternD500
    browseable = yes
    read only = no
    guest ok = yes
    writable = no
    create mask = 0644
    directory mask = 0755
    force user = r-c
    force group = r-c
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum