树莓派初始设置

用户名 pi 密码raspberry

sudo vi /etc/network/interfaces

        auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.103.83
gateway 192.168.103.7
netmask 255.255.255.0
 allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp


/etc/resolv.conf

nameserver 8.8.8.8


转到图形界面

init 5


apt-get install samba

vi /etc/samba/smb.conf

找到下面这一段
####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
   security = user 修改这一行
找到这一段

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
   map to guest = bad user
   guest account = pi 添加这一行

到文件底部
添加下面几行

[Media]
comment = usb storage
path = /home/pi
browseable = Yes
read only = No
guest ok = Yes    




Ctrl+O保存  Ctrl+X退出
运行命令
service samba restart



你可能感兴趣的:(linux)