setup and test samba server
Configuration
/etc/samba/smb.conf You knew it. Only security and [homes] are not default, the others are default. In this configuration, all the \\server\\username can be accessed.
[global] workgroup = WORKGROUP server string = %h server (Samba, Ubuntu) dns proxy = no log file = /var/log/samba/log.%m max log size = 1000 syslog = 0 panic action = /usr/share/samba/panic-action %d security = user encrypt passwords = true passdb backend = tdbsam obey pam restrictions = yes unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . pam password change = yes map to guest = bad user [homes] comment = %U Home Directories browseable = Yes read only = no create mask = 0660 directory mask = 0700 valid users = %SFor other user(not the user created during the OS installation but created with user add)
We still need to sudo smbpasswd -a <username>
Could we use unix user dirctly?
Show smbpwd users
$ sudo pdbedit -Lw
Test samba
Linux command line
smbclient -L <IP> -U guest -N #list
smbclient -L <IP> -U <username> #list
smbclient \\<IP>\<username> -U <username> # login
Mount for current user
sudo apt-get install cifs-utils
sudo mount.cifs -o username=<samba username>,uid=${USER} //<samba server>/directory/ /<local directory>
Windows
You may get 'Multiple connections' or 'disconnect previous connections' error in windows
rem list the connections
net use
rem remove all the connections
net use * /delete
usershare
Allow non-root/sudoers to create shares
相關文章
- Sql Server Linux(Redhat) Distributed Availability Group Setup — step by stepSQLServerLinuxRedhatAI
- setup
- Samba服務Samba
- Linux Samba 部署LinuxSamba
- .單機版samba設定 /etc/samba/smb.confSamba
- Vue 3 setupVue
- SETUP(安裝)
- Oracle Audit setupOracle
- test
- ubuntu設定sambaUbuntuSamba
- test_NO
- Unit test
- Samba安裝與使用Samba
- vlc play video shared by sambaIDESamba
- 使用Samba共享檔案Samba
- 【Android Test】糟心的“Empty test suite ”異常AndroidUI
- Windows server 2003環境下,安裝Oracle的時候,雙擊Setup沒有任何的反應WindowsServerOracle
- HTTPs setup - Certbot + Docker + NginxHTTPDockerNginx
- linux之__setup函式Linux函式
- AB test 中的AA test有什麼作用?
- test easyui with nodejsUINodeJS
- Test Oracle triggerOracle
- test123
- test日記
- test2024.3.21
- Shell test 命令
- test6
- test4
- test2
- Test12
- WPF test GPUGPU
- 1-test
- test3
- test004
- test1
- Numerical test reports
- gstreamer-test
- 小小test整理
- Linux伺服器---配置sambaLinux伺服器Samba