# Schulserver SMB&PDC&CUPS

## grim

Hallo Leute,

gestern hat ein Freund von mir, mir sein Leid geklagt das seine Schule keine Kolhe hat sich ein neuen Win$$ws Server OS zu kaufen. Nach einiger Zeit habe ich mich überreden lassen einen samba server für sie aufzusetzen.

Da ich aber auch nicht der absolute samba oder cups Man bin, bitte ich euch einen kurzen Blick auf die smb.conf zu werfen.

```

[global]

    workgroup = test.lan

    server string = %h server

    interfaces = 127.0.0.1, 192.168.0.0/24

    hosts allow = 127.0.0.1, 192.168.0.0/24

    hosts deny = all

    map to guest = Bad User

    passwd program = /usr/bin/passwd %u

    passwd chat = *password* %n\n *password* %n\n *changed*

    passwd chat debug = yes

    username map = /etc/samba/smbusers

    unix password sync = yes

    log level = 3

    passdb backend = smbpasswd 

    encrypt passwords = yes

#printserver cups

    load printers = Yes

    printing = cups

    printcap name = cups

#samba als pdc   

           domain logons = yes

    preferred master = Yes

    domain master = Yes

    os level = 65

    netbios name = schulserver

    logon path = \\%L\profiles\.msprofile

    logon drive = h:

    logon home = \\%L\%U\.9xprofile

    logon script = logon.bat

    wins support = yes

    admin users = smbadmin

[profiles]

    comment = Network Profiles Service

    path = /srv/samba/profiles

    read only = no

    create mask = 0600

    directory mask = 0700

   browsable = no

   guest ok = no

   printable = no

   hide files = /desktop.ini/outlook*.lnk/*Briefcase*/ 

   store dos attributes = yes

[homes]

    comment = Home Directories

    valid users = %S

    read only = no

    inherit acls = yes

    browseable = no

[public]

    comment = Public

    path = /home/public

    browseable = yes

    create mask = 0777

    directory mask = 0777

    guest ok = yes

    writable = yes

    share modes = yes

#printfreigaben cups

[printers]

   comment = All Printers

   path = /var/spool/samba/print

   printer = Klassenraum Drucker

   browseable = No

   public = Yes

   guest ok = Yes

   writable = No

   printable = Yes

   printer admin = @ntadmins

#druckertreiber cups

[print$]

   comment = Printer Drivers Share

   path = /var/lib/samba/drivers

#   write list = 

#   printer admin = 

[netlogon]

    comment = Network Logon Service

    path = /home/netlogon

    writable = no

    browseable = no 

   

```

Von einem LDAP Server sehe ich von ab, da die Lehrer an dieser Schule diesen selber administrieren müssten.

Wenn Ihr Vorschläge habt bitte posten. 

Bin für jede Hilfe dankbar!!   

Grüsse

Grim

----------

## grim

Nachtrag:

```

character set = ISO8859-15

client code page = 850

```

lg

grim

----------

## manuels

Was liegt denn für ein Problem vor?

Oder willst du dir nur die Konfigurationsdatei "absegnen" lassen?

----------

## grim

Hallo,

ich wollte die eingendlich nur "absegnen lassen. Das Problem ist, das ich für die Migration nur einen Tag zeit habe.

Was meint Ihr? Habe ich etwas vergessen?

Gruss

grim

----------

## tgurr

 *grim wrote:*   

> Nachtrag:
> 
> ```
> 
> character set = ISO8859-15
> ...

 

Falls dein Linux System unter UTF-8 (z.B. wegen CUPS) laufen soll, solltest du die obigen Zeilen durch folgende ersetzen, um keine Probleme im Zusammenspiel mit Windows zu bekommen:

```
dos charset = 850

unix charset = UTF-8
```

----------

## grim

Hallo,

danke für deine Hilfe!!

Folgende .conf werde ich heute mal testen:

```

[global]

    workgroup = test.lan

    netbios name = schulserver

    server string = %h server

    security = user

    interfaces = 127.0.0.1, 192.168.0.0/24

    hosts allow = 127.0.0.1, 192.168.0.0/24

    hosts deny = all

    map to guest = Bad User

    log level = 2

    preferred master = Yes

    domain master = Yes

    os level = 255

    wins support = yes

    admin users = smbadmin

    domain logons = yes

    local master = yes

    logon path = \\%N\profiles\%U

    logon drive = S:

    logon home = \\schulserver\%U\winprofile

    logon script = logon.bat

    load printers = Yes

    passwd program = /usr/bin/passwd %u

    passwd chat = *password* %n\n *password* %n\n *changed*

    passwd chat debug = yes

    username map = /etc/samba/smbusers

    unix password sync = yes

    passdb backend = tdbsam

    encrypt passwords = yes

    printer admin = @ntadmin

    printing = cups

    printcap name = cups

    dos charset = 850 

    unix charset = UTF-8

[profiles]

    comment = Network Profiles Service

    path = /srv/samba/profiles

    read only = no

    create mask = 0600

    directory mask = 0700

    browsable = no

    guest ok = no

    printable = no

    hide files = /desktop.ini/outlook*.lnk/*Briefcase*/ 

    store dos attributes = yes

[homes]

    comment = Home Directories

    valid users = %S

    read only = no

    inherit acls = yes

    browseable = no

[public]

    comment = Public

    path = /home/public

    browseable = yes

    create mask = 0777

    directory mask = 0777

    guest ok = yes

    writable = yes

    share modes = yes

[printers]

    comment = All Printers

    path = /var/spool/samba/print

    printer = Klassenraum Drucker

    browseable = No

    public = Yes

    guest ok = Yes

    writable = No

    printable = Yes

    printer admin = @ntadmins

[print$]

    comment = Printer Drivers Share

    path = /etc/samba/drivers

    write list = @ntadmin, root

    browseable = no

    read only = yes

[netlogon]

    comment = Network Logon Service

    path = /home/netlogon

    writable = no

    browseable = no 

```

Ich denke die sollte gehen.

Falls nicht werde ich nochmals posten!

----------

