顯示包含「Samba」標籤的文章。顯示所有文章
顯示包含「Samba」標籤的文章。顯示所有文章

4.27.2011

Update Samba idmap

Environment:
OS: CentOS 5.2
Samba: 3.5.9-44
  1. Backup you old idmap data "net idmap dump /var/lib/samba/winbindd_idmap.tdb > /root/idmap-backup.txt" (please clarify your idmap location, you can use this command "locate winbindd_idmap.tdb") 
  2. Use vi or nano to modify your idmap data.
  3. remove all files inside /var/lib/samba/ ("rm -fr /var/lib/samba")
  4. restart winbind ("/etc/init.d/winbind restart")
  5. import new imap data to tdb file "cat /root/idmap-backup.txt | net idmap restore"
  6. Update System Info "getent passwd", "getent group"
To verify the new winbind_idmap db please dump the tdb file again (step 1) to check the data.

4.19.2011

Build Samba RPM from Source (samba-3.5.8)

Environment:
OS: CentOS 5.6
Kernel: 2.6.18-238.5.1.el5
Unofficial RPM Build for RHEL link
  1. install development tools "yum -y groupinstall 'Development Tools' "
  2. Download Samba Source Link
  3. Extract source file (samba-3.5.8.tar.gz)
  4. cd amba-3.5.8/packaging/RHEL
  5. nano samba.spec
  6. Search the line "BuildRequires" update "keyutils-devel" to "keyutils-libs-devel"
  7. Search the line "cc="$cc" CLFLAGS= [..skipped..]   ./configure" and add this new line "--with-cifsumount \"
  8. run "sh makerpms.sh &>/root/samba.build.log"
  9. When the end of the process has shown "error: Installed (but unpackaged) file(s) found:", please add those mentioned file in the "samba.spec" file at the end of "%files" section, and then repeat step 8.
  10. Now the new rpm files should built in "/usr/src/redhat/RPMS/i386"
  11. You need to uninstall the installed samba please run "rpm -e samba-common samba samba-client --nodeps"
  12. And you need to uninstall some dependent files, please run "rpm -e libsmbclient libtdb libtalloc --nodeps"
  13. Install new the samba rpms run "rpm -ivh samba*"

Setup Netatalk for Cent OS 5.6 (Guest Login ONLY)

Environment:
OS: Cent OS 5.6
Kernel: 2.6.18-238.5.1

Assumption:
You had installed a support netatalk kernel.

  1. Download the Netatalk RPM file (Link - netatalk-2.0.5-1.el5.i386.rpm).
  2. rpm -ivh netatalk-2.0.5-1.el5.i386.rpm
  3. Update /etc/atalk/netatalk.confATALK_MAC_CHARSET='UTF8-MAC'
    ATALKD_RUN=no
    PAPD_RUN=no
    CNID_METAD_RUN=yes
    AFPD_RUN=yes
    TIMELORD_RUN=no
    A2BOOT_RUN=no
  4. Append the below line to  /etc/atalk/afpd.conf "Mac Share" -uamlist uams_guest.so -tcp -noddp
  5. Append the below line to /etc/atalk/AppleVolumes.default/home/public    "Share" options:usedots,invisibledots,noadouble ea:none
  6. Create a new file with below content /etc/avahi/services/afpd.service
    <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
    <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
    <service-group>
        <name replace-wildcards="yes">%h Drive</name>
        <service>
            <type>_afpovertcp._tcp</type>
            <port>548</port>
        </service>
        <service>
            <type>_device-info._tcp</type>
            <port>0</port>
            <txt-record>model=Xserve</txt-record>
        </service>
    </service-group>
  7. run /etc/init.d/avahi-daemon start
  8. run /etc/init.d/atalk start
  9. If you share the same folder with samba please update your smb.conf with below options
    veto files = /._*/.DS_*/.AppleDB/.AppleDouble/.AppleDesktop/Network Trash Folder/TheFindByContentFolder/TheVolumeSettingsFolder/Temporary Items/.TemporaryItems/.VolumeIcon.icns/Icon?/.FBCIndex/.FBCLockFolder/
    delete veto files = Yes
    vfs objects = netatalk
Netatalk Setup Reference
Netatalk Setup Reference