Add

Instalare si configurare Samba


Samba este un soft open source, care permite sistemelor de operare unix-based sa “se vada” in retea cu PC-urile cu Windows. Samba este de fapt implementarea mai multor protocoale intr-un singur soft capabil sa comunice simultan cu aceste protocoale: SMB, TCP/IP, NetBIOS (protocolul implementat in Network Neighborhood din Windows), WINS si Active Directory (pt asta trebuie setat kerberos).

In primul rand, pentru a seta cu succes Samba, trebuie ca masina pe care ruleaza linux sa aibe IP static. In caz contrar, nu se va putea folosi WINS…

Se instaleaza Samba:

#sudo apt-get install samba

Dupa instalare, trebuie sa ne asiguram ca Samba nu ruleaza:

#sudo /etc/init.d/samba stop

smb.conf este fisierul de configurare al Samba. Vom redenumi acest fisier in cele ce urmeaza:

#sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.template

Cu urmatoarea comanda vom crea un fisier nou:

#sudo touch /etc/samba/smb.conf

Dupa care vom edita noul fisier in editorul preferat:

#sudo gedit /etc/samba/smb.conf

Cam asta ar trebui pus in noul fisier:

[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

Sigur ca trebuie facute cateva mici modificari:

netbios name = YOUR_HOSTNAME trebuie inlocuit cu HOSTNAME-ul tau

workgroup = YOUR_WORKGROUP trebuie inlocuit cu WORKGROUP-ul tau (cel care e setat si pe Windows). In general, pe Windows, numele workgrupului este: WORKGROUP sau MSHOME.

wins support = yes

Daca nu ai IP static, sau din diferite motive folosesti un IP dimanic, optiunea de mai sus trebuie setata cu “no” in loc de “yes”.

[MyFiles] este numele share-ului.Poate fi redenumit oricum, insa ar trebui evitate spatiile ( ca de altfel si la celelalte denumiri).

path = /media/samba/ presupunem ca acest path e un HDD mounted sau o alta partitie, si e locul unde vor fi salvate fisierele share-uite.

In cazul in care nu si un alt harddisk la dispozitie, sau o alta partitie, se poate crea un folder pe Home de exemplu, in care se pot tine fisierele share-uite:

#sudo mkdir /home/samba

In acest caz, path-ul va fi:

#path = /home/samba/

Deoarece /home/samba va fi un folder in care va trebui sa scrie mai multe lume, ii vom acorda permisiunile corecte:

#sudo chmod 0777 /home/samba

Cam astea ar fi setarile, trebuie sa pormin serviciul acum:

#sudo /etc/init.d/samba start

Mai trebuie adaugati userii.

Samba este un soft open source, care permite sistemelor de operare unix-based sa “se vada” in retea cu Pc-urile cu Windows. Samba este de fapt implementarea mai multor protocoale intr-un singur soft capabil sa comunice simultan cu aceste protocoale: SMB, TCP/IP, NetBIOS (protocolul implementat in Network Neighborhood din Windows), WINS si Active Directory (pt asta trebuie setat kerberos).

In primul rand, pentru a seta cu succes Samba, trebuie ca masina pe care ruleaza linux sa aibe IP static. In caz contrar, nu vei putea folosi WINS…

Se instaleaza Samba:

#sudo apt-get install samba

Dupa instalare, trebuie sa ne asiguram ca Samba nu ruleaza:

#sudo /etc/init.d/samba stop

smb.conf este fisierul de configurare al Samba. Vom redenumi acest fisier in cele ce urmeaza:

#sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.template

Cu urmatoarea comanda vom crea un fisier nou:

#sudo touch /etc/samba/smb.conf

Dupa care vom edita noul fisier in editorul preferat:

#sudo gedit /etc/samba/smb.conf

Cam asta ar trebui pus in noul fisier:

[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

Sigur ca trebuiesc facute cateva mici modificari:

netbios name = YOUR_HOSTNAME trebuie inlocuit cu HOSTNAME-ul tau
workgroup = YOUR_WORKGROUP trebuie inlocuit cu WORKGROUP-ul tau (cel care e setat si pe Windows). In general, pe o masina Windows, numele workgrupului este: WORKGROUP sau MSHOME.

wins support = yes

Daca nu ai IP static, sau din diferite motive folosesti un IP dimanic, optiunea de mai sus trebuie setata cu “no” in loc de “yes”.

[MyFiles] este numele share-ului.Poate fi redenumit oricum, insa ar trebui evitate spatiile ( ca de altfel si la celelalte denumiri).

path = /media/samba/ presupunem ca acest path e un HDD mounted sau o alta partitie, si e locul unde vor fi salvate fisierele share-uite.

In cazul in care nu si un alt harddisk la dispozitie, sau o alta partitie, se poate crea un folder pe Home de exemplu, in care se pot tine fisierele share-uite:

#sudo mkdir /home/samba

In acest caz, path-ul va fi:

#path = /home/samba/

Deoarece /home/samba va fi un folder in care va trebui sa scrie mai multe lume, ii vom acorda permisiunile corecte:

#sudo chmod 0777 /home/samba

Cam astea ar fi setarile, trebuie sa pormin serviciul acum:

#sudo /etc/init.d/samba start

Mai trebuiesc adaugati userii, insa asta data viitoare.Samba este un soft open source, care permite sistemelor de operare unix-based sa “se vada” in retea cu Pc-urile cu Windows. Samba este de fapt implementarea mai multor protocoale intr-un singur soft capabil sa comunice simultan cu aceste protocoale: SMB, TCP/IP, NetBIOS (protocolul implementat in Network Neighborhood din Windows), WINS si Active Directory (pt asta trebuie setat kerberos).

In primul rand, pentru a seta cu succes Samba, trebuie ca masina pe care ruleaza linux sa aibe IP static. In caz contrar, nu vei putea folosi WINS…

Se instaleaza Samba:

#sudo apt-get install samba

Dupa instalare, trebuie sa ne asiguram ca Samba nu ruleaza:

#sudo /etc/init.d/samba stop

smb.conf este fisierul de configurare al Samba. Vom redenumi acest fisier in cele ce urmeaza:

#sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.template

Cu urmatoarea comanda vom crea un fisier nou:

#sudo touch /etc/samba/smb.conf

Dupa care vom edita noul fisier in editorul preferat:

#sudo gedit /etc/samba/smb.conf

Cam asta ar trebui pus in noul fisier:

[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

Sigur ca trebuiesc facute cateva mici modificari:

netbios name = YOUR_HOSTNAME trebuie inlocuit cu HOSTNAME-ul tau

workgroup = YOUR_WORKGROUP trebuie inlocuit cu WORKGROUP-ul tau (cel care e setat si pe Windows). In general, pe o masina Windows, numele workgrupului este: WORKGROUP sau MSHOME.

wins support = yes

Daca nu ai IP static, sau din diferite motive folosesti un IP dimanic, optiunea de mai sus trebuie setata cu “no” in loc de “yes”.

[MyFiles] este numele share-ului.Poate fi redenumit oricum, insa ar trebui evitate spatiile ( ca de altfel si la celelalte denumiri).

path = /media/samba/ presupunem ca acest path e un HDD mounted sau o alta partitie, si e locul unde vor fi salvate fisierele share-uite.

In cazul in care nu si un alt harddisk la dispozitie, sau o alta partitie, se poate crea un folder pe Home de exemplu, in care se pot tine fisierele share-uite:

#sudo mkdir /home/samba

In acest caz, path-ul va fi:

#path = /home/samba/

Deoarece /home/samba va fi un folder in care va trebui sa scrie mai multe lume, ii vom acorda permisiunile corecte:

#sudo chmod 0777 /home/samba

Cam astea ar fi setarile, trebuie sa pormin serviciul acum:

#sudo /etc/init.d/samba start

Mai trebuiesc adaugati userii, insa asta data viitoare.

1 Star2 Stars3 Stars4 Stars5 Stars (14 votes, average: 4.86 out of 5)
Loading ... Loading ...

No comments yet.

Respond

get in on the action.

* Required

Rumanian flagItalian flagEnglish flagGerman flagFrench flagSpanish flagRussian flagGreek flagDutch flagBulgarian flagCzech flagCroat flagDanish flagFinnish flagSwedish flagNorwegian flagSerbian flagSlovenian flagUkrainian flagTurkish flagHungarian flag
By N2H

Random Posts Recent Comments

  • admin Says:

    Amigo, Please formulate your question in english if you really need help! Cheers!...

  • Mauricio Gonçalves Says:

    Boa tarde, Amigo eu não consigo add novo user poderia me ajudar? ele fala que o comando não é ...

  • Flossy Says:

    Zubao0 That's really thinking out of the box. Thanks!...

  • Michael Esch Says:

    I used this tutorial to install Komodo Edit 6 on Ubuntu 10.10; I rate your tutorial 5/5 I hope that...

  • admin Says:

    @dan Am rulat aplicatii create in visual basic si in fox sub wine, deci cred ca nu ar trebui sa fie ...

  • dan Says:

    as dori sa imi spuneti daca un prg de conta sub visual basic ruleaza cu wine sub ubuntu intreb deo...

  • admin Says:

    Thank you all for your comments. As I was busy latelly, I haven't answer to your posts. I hope you u...

  • tcpdump Says:

    Hello, I also faced the error "It appears as though you do not have permission to view informatio...

  • Ali Says:

    awesome!!!...

  • Schedule Says:

    You you should make changes to the post subject Split and join files in Ubuntu with lxsplit | EtutsR...

Tag Cloud