- 论坛徽章:
- 13
|
- 以前的笔记供您参考!
- > cat samba.txt
- # Samba
- # CIFS(Common Internet File System)
- # NetBIOS(Network Basic Input/Output System)
- /etc/samba/smb.conf
- /etc/samba/smbpasswd
- /etc/samba/smbusers
- /usr/bin/testparm
- /usr/bin/smbstatus
- /usr/bin/smbpasswd
- /usr/bin/smbclient
- /usr/bin/nmblookup
- /usr/bin/smbtree
- nmbd (UDP:137,138port)
- smbd (TCP:139,445port)
- samba samba-common samba-client
- chkconfig smb on
- service smb restart
- # ATTENTION: the 'security context' should be changed as follow ~!Oops..
- chcon -Rvt samba_share_t /shared/
- dumpe2fs -h /dev/sda5
- vim /etc/fstab
- LABEL=/1 ext3 defaults,acl 1 1
- mount -o remount,acl /
- # 1>: Group Control
- setfacl -m d:g:groupname:rwx /shared
- getfacl /shared
- mask+actual permission = effective permission
- # 2>: User Control
- chown jacky:jacky /shared (Control only one user)
- smbpasswd -a jacky
- cat /etc/samba/smbpasswd
- smbpasswd -d jacky
- smbpasswd -e jacky
- smbclient //192.168.0.12/shared -U jacky
- smbclient -L //127.0.0.1 -U user%password
- mount -t cifs //station12/shared /mnt -o username=jacky,password=jacky
- # AutoMounter for Samba
- chkconfig autofs on
- service autofs restart
- vim /etc/auto.master
- /home /etc/auto.samba --timeout=60
- cp /etc/auto.misc /etc/auto.samba
- vim /etc/auto.samba
- samba -fstype=cifs,username=?,password=? ://192.168.1.4/shared
- # User Home's Access Control
- getsebool -a | grep samba
- setsebool -P samba_enable_home_dirs=1
- service smb restart
- cat /etc/sysconfig/i18n
- LANG="en_US.UTF-8"
复制代码 |
|