Portál AbcLinuxu, 5. května 2025 23:16
[global] workgroup = domena server string = %h server dns proxy = no #### Networking #### #### Debugging/Accounting #### log file = /var/log/samba/log.%m max log size = 1000 syslog = 2 panic action = /usr/share/samba/panic-action %d ####### Authentication ####### security = user encrypt passwords = true passdb backend = tdbsam obey pam restrictions = yes invalid users = root passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* . password server = RPSPDC ########## Domains ########### domain logons = yes domain master = yes os level = 65 add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u ########## Printing ########## load printers = no printing = bsd printcap name = /dev/null ############ Misc ############ socket options = TCP_NODELAY #======================= Share Definitions ======================= [homes] comment = Home Directories browseable = no writable = yes create mask = 0700 directory mask = 0700 valid users = %S [profiles] comment = Users profiles writable = yes path = /home/samba/profiles guest ok = no browseable = no create mask = 0600 directory mask = 0700 [data] comment = Data RPS writable = yes locking = no path = /data/data public = no create mask = 0777 directory mask = 0777 oplocks = yes level2 oplocks = yes share modes = yes inherit permisions = yes [sw] comment = SW writable = yes locking = no path = /data/sw public = no create mask = 0777 directory mask = 0777
[global] ; include = /etc/samba/smb.conf.%m dos charset = 852 workgroup = MOJEDOMENA ;realm = server netbios name = NAZEVSERVERU server string = Souborovy server ;interfaces = eth0, lo security = user null passwords = Yes map to guest = Bad User ;usershare allow guests = Yes # Samba users and passwords ;Pouzivam radeji textovy soubor smbpasswd smb passwd file = /etc/samba/smbpasswd encrypt passwords = yes passdb backend = smbpasswd unix password sync = yes pam password change = yes passwd program = /usr/bin/passwd %u passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully* obey pam restrictions = yes # Add/Remove machine into domain add user script = /usr/sbin/useradd -m -G users %u delete user script = /usr/sbin/userdel /r %u add group script = /usr/sbin/groupadd %g delete group script = /usr/sbin/groupdel %g add user to group script = /usr/sbin/usermod -A %g %u add machine script = /usr/sbin/useradd -s /bin/false -d /var/lib/nobody %u # Logon domain and site browsing logon script = netlogon.bat logon path = \\%L\profiles logon drive = P: logon home = \\%L\%U\.9xprofile domain logons = Yes domain master = Yes preferred master = Yes os level = 128 # Print server setting ... printcap name = cups printcap cache time = 750 cups options = raw printing = cups # Windows Internet Name Nervice - all NetBIOS name must be resolved, WINS is optional. name resolve order = wins lmhosts host bcast wins support = Yes wins proxy = No ldap ssl = no # Time server for SMB users. Usage: net time \\server /set /yes time server = yes # Winbind config. This is optional setting for users Windows 2000 / XP ;winbind separator = \ winbind uid = 10000-20000 winbind gid = 10000-20000 winbind cache time = 5 winbind enum users = yes winbind enum groups = yes ;template homedir = /home/%U ;template shell = /bin/bash ;winbind use default domain = yes ;winbind trusted domains only = Yes ;winbind nested groups = Yes ;passdb backend = tdbsam admin users = @ntadmin acl group control = Yes acl compatibility = win2k profile acls = Yes map acl inherit = Yes # Logging run Samba ... 1 is optional, 3-5 for Debug !!! log level = 1 #------------------------------------------------------------------------ # Directories for users # ----------------------------------------------------------------------- --- tady jsou sekce pro sdílení ---Takhle jsem to před cca 2mi lety odladil pro Linuxové servery pro školy a dodnes to tak bezproblémů funguje. Nezapomeň, že pro Add Domain je nutné, aby ti to dokázalo přeložit/najít SMB server v síti. Já využívám WINS a osvědčilo se mi to. Do smbusers si nezapomeň přidat alias root=administrator, protože takto se budeš přihlašovat k zápisu PC do domény. V souboru smbpasswd pak vznikne něco takového:
POCITAC$:1019:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:2DD311034BDD174F8EAA836E21FEBE1C:[W ]:LCT-4CE270D7:PS: Zatím to nemám odladěné pro Windows7, ale pracuji na tom ...
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.