Samba Server setup
本文最后更新于 850 天前,其中的信息可能已经有所发展或是发生改变。

Simple Samba file sharing server setup
This is a minimal Samba setup to let other machines access files on a Debian machine.

Install Samba Server and Samba Client

sudo apt-get install samba
sudo apt-get install samba-client

Server

Edit the Samba configuration file.

sudo vim /etc/samba/smb.conf

To share files in some other path on the system, add another share definition such as:

[ourfiles]
     comment = Some useful files
     read only = no
     locking = no
     path = /path_to_our_files
     guest ok = no

Add Samba users

Samba uses it’s own password system so users need to be added by root. Note that the users have to exist in /etc/passwd

sudo smbpasswd -a username

You will be prompted for a password for each of those users.

To list existing Samba users:

sudo pdbedit -w -L

Restart the Samba daemon

sudo /etc/init.d/samba restart
//or, if you are using systemd
sudo systemctl restart smbd

Client

Try to access the shares (as a normal user)
Try locally first, then from another machine on the network which also installed samba client. When prompted, use the password entered when adding the user to Samba.

To access my share:

$ smbclient //ourmachine/me

To access your share:

$ smbclient -U you //ourmachine/you

To access our shared(!) share:

$ smbclient //ourmachine/ourfiles
暂无评论

发送评论 编辑评论


|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇