Fórum Ubuntu CZ/SK
Ubuntu pro osobní počítače => Internet a sítě => Téma založeno: rado3105 15 Března 2008, 21:28:32
-
Potreboval by som zdielat disk v sambe(podobne ako ked si dam zdielat priecinok vo windowse, iny windows uzivatel ked nahodi do explorera alebo total commandera moju ip adresu ukaze mu vsetky moje zdielane veci a moze sa do nich pripajat bez prihlasovania a davania hesie - proste verejne).
Viete poradit????
pouzil som navod na ubuntu wiki ale akosi nic:
[Multimedia]
path =/media/sda5
public = yes
writable = no
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
comment = Multimedia
security = share
-
zkus se zaměřit na parametry guest only, guest ok
já bych měl složitější požadavek jde namountovat přes cifs sítový disk, aby byl pro admina rw a pro ostatní jen ro (nebo by ostatní směli vidět jen některé složky) pro admina rw už mám, ted i pro ty ostatní. Pozor disk je fat32 a udělal jsem to pomocí option uid a gid.
-
Stačí do smb.conf do sekce global dát
security=share
viz. http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/ref-guide/s1-samba-security-modes.html
-
Myslím, že to tam má, když to uvedl.
-
V sekci global?
-
Hej mam to v sekci global:
####### 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 detailed information
security = share
# You may wish to use password encryption. See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
encrypt passwords = true
Skusil som este tento sposob a aj tam pyta heslo
interfaces = lo eth1
bind interfaces only = true
security = share
...
...
guest account = nobody
[Guest Share]
comment = Guest access share
path = /media/sda5
browseable = yes
read only = yes
guest ok = yes
-
If you wish to restrict access in a share only to guests - in other words, all clients connect as the guest account when accessing the share - you can use the guest only option in conjunction with the guest ok option, as shown in the following example:
[sales]
path = /home/sales
comment = Fiction Corp Sales Data
writeable = yes
guest ok = yes
guest account = ftp
guest only = yes
Make sure you specify yes for both guest only and guest ok in this scenario; otherwise, Samba will not use the guest acount that you specify.
http://www.oreilly.com/catalog/samba/chapter/book/ch06_02.html (http://www.oreilly.com/catalog/samba/chapter/book/ch06_02.html)
-
stale to nejde
tu som uploadnul moj smb.conf : http://www.upnito.sk/download.php?dwToken=6dcb5bcd9d0d270f3d9f4c152ae267a3
ak by chcel niekto pomoct
VOpred Dakujem
-
Ale keby mi ktosi poslal svoj smb.conf, by mi to asi viac pomohlo
-
Tak možná zkus restartovat klienta (předpokládám Windows) a i server. A dělal jsi to podle návodů na wiki? http://wiki.ubuntu.cz/Samba#head-fc42e77f0c431299ac11f3c146ef3b6716261af4 (http://wiki.ubuntu.cz/Samba#head-fc42e77f0c431299ac11f3c146ef3b6716261af4)
Se security = user ti to funguje? Nemáš Mac OSX? Jak to máš s uživateli? Bacha na case sensitive.
-
ostatni na sieti maju windowsy/tam ide samba v pohode na jednom pocitaci dam zdielat a z druheho v sieti sa nan pripojim - bud po zadani ip adresy do explorera alebo do total comandera), tak by som chcel aby to fungovalo aj po pripojeni z windows na ubuntu ktore momentalne pouzivam(bez ziadneho hesla a autorizacie - pre clenov LAN). Ip lan je: 192.168.76.0/24
Ip pocitaca s ubuntu na ktory sa chcem pripojit z windowsu je: 192.168.76.99(LANX Je nazov siete, UBUNTU LAPTOP nazov pocitaca s ubuntu)
Tu je moj smb.conf:
[global]
netbios name = UBUNTU LAPTOP
server string = CAD architects, Stockholm. East 32nd st, 34th floor
workgroup = LANX
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 =
-
Ja sdilim adresar pro public takto ....
GLOBAL
security = user
username map = /etc/samba/smbusers
guest account = nobody
invalid users = root
map to guest = Bad Password
// map to guest se da zmenit treba na user ( je to, co udelat kdyz se spatne prihlasi resp zada spatne heslo...zkracene valid users bude user a kdyz se uzivatel prihlasi jako user a zada spatne heslo tak se znej stane guest ..pokud se prihlasi jako guest, tak je guest hned)
a slozka ke sdileni
browseable = yes
public = yes
guest ok = yes
writable = yes
create mask = 0755
directory mask = 0755
force user = nobody
force group = nogroup
-
Ja sdilim taktez pro vsechny bez hesla. Muj disk je videt ve windows prez Tento pocitac -> Mista v siti -> Zobrazit okolni pocitace -> Ubuntu server(public)
Prikladam svuj smb.conf.
[attachment deleted by admin]
-
A ako to upravit aby mi fungovalo zdielanie pre vsetkych bez hesla, ale aby niektory uzivatelia mohli aj zapisovat na dany disk(ci uz podla ip adresy , mena pocitaca, alebo kazdemu by pri pokuse o zapis vyskocila tabulka vyzadujuca meno a heslo a keby ich zadal mohol by zapisovat)
Moj sucasny smb.conf:
[global]
; General server settings
netbios name = rclr-srv
server string = rclr-srv
workgroup = xxxxxx
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
[WD1TB]
comment = WD1TB
path = /media/WD1TB
browseable = yes
guest ok = yes
create mask = 0644
directory mask = 0755
force user = r-c
force group = r-c
writable = no
-
no pokud se nepletu tak by to melo byt presne pres
map to guest = bad password
a jako valid users (groups) dat ty co maji mit pristup zapisovat .... + mozna jeste guest //aby ho to pustilo do slozky
vypnout force permission a nechat prava jake bude mit onen adresar ..... napr .... owner "FRANTA" group "USERS" permissions "RWX-RWX-R"
to by melo byt ze FRANTA a USERS mohou zapisovat spoustet a ostatni (valid users > guest) jen read