FreeBSD 安装配置samba服务器[samba36版本]
来源:互联网 发布:淘宝买摩托车被骗 编辑:程序博客网 时间:2024/06/10 09:13
# make install clean
Now edit /etc/rc.conf so that Samba will start with every system boot. Add this line to the file and save:
samba_enable="YES"
Configure Samba
Edit /usr/local/etc/smb.conf
Specify where you will be able to connect:
; hosts allow = 192.168.1. 192.168.2. 127.
Remove the semi-colon and change the IP address so it matches your network. For example, in my case:
hosts allow = 192.168.1. 192.168.0. 127. 10.1.1.
Now configure the share in the same configuration file:
[unixmen]
comment = Unixmen FreeBSD SAMBA
path = /Unixmen
valid users = pirat9
public = no
writable = yes
Save and exit.
Adding Samba user
Use command adduser to add unix user. In my situation pirat9:
root@FreeBSD-unixmen:/root # adduser
Username: pirat9
Full name: test1 test2
Uid (Leave empty for default):
Login group [test]:
Login group is test. Invite test into other groups? []:
Login class [default]:
Shell (sh csh tcsh bash rbash nologin) [sh]:
Home directory [/home/test]:
Home directory permissions (Leave empty for default):
Use password-based authentication? [yes]:
Use an empty password? (yes/no) [no]:
Use a random password? (yes/no) [no]:
Enter password:
Enter password again:
Lock out the account after creation? [no]:
Username : pirat9
Password : *****
Full Name : test1 test2
Uid : 1002
Class :
Groups : pirat9
Home : /home/pirat9
Home Mode :
Shell : /bin/sh
Locked : no
OK? (yes/no): yes
adduser: INFO: Successfully added (pirat9) to the user database.
Add another user? (yes/no):
Add the directory you want to share for Samba:
root@FreeBSD-unixmen:/root # mkdir -p /Unixmen
Adding the Samba group and the user pirat9:
root@FreeBSD-unixmen:/root # pw groupadd smbprivate -M pirat9
Change permission on the Samba folder:
root@FreeBSD-unixmen:/root # chgrp smbprivate /Unixmen
root@FreeBSD-unixmen:/root # chmod 770 /Unixmen
Now it’s time to set the password:
root@FreeBSD-unixmen:/root # smbpasswd -a pirat9
New SMB password:
Retype new SMB password:
Added user pirat9.
Start the Samba server:
root@FreeBSD-unixmen:/root # /usr/local/etc/rc.d/samba start
Removing stale Samba tdb files: . done
Starting nmbd.
Starting smbd.
Testing the server
Run this command to test the server:
root@FreeBSD-unixmen:/root # smbclient -U pirat9 -L localhost
Enter pirat9's password:
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.9]
Sharename Type Comment
--------- ---- -------
unixmen Disk Unixmen FreeBSD SAMBA
IPC$ IPC IPC Service (Samba Server)
pirat9 Disk Home Directories
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.9]
Server Comment
--------- -------
FREEBSD-UNIXMEN Samba Server
Workgroup Master
--------- -------
MYGROUP FREEBSD-UNIXMEN
Now try to connect from a Windows OS machine and login with the Samba credentials:
\\ip-to-your-freebsd-server
This is how it displays from Windows 7.
- FreeBSD 安装配置samba服务器[samba36版本]
- 安装配置Samba服务器
- fedora14 安装配置samba服务器
- Samba服务器安装与配置
- samba服务器的安装配置
- fedora14 安装配置samba服务器
- samba服务器的安装配置
- samba服务器安装与配置
- samba服务器安装和配置
- samba服务器安装与配置
- Samba服务器安装和配置
- CentOS7安装配置SAMBA服务器
- ubuntu 安装配置samba服务器
- Ubuntu安装配置Samba服务器
- Centos安装配置Samba服务器
- CentOS7安装配置Samba服务器
- Centos安装配置Samba服务器
- linux安装配置samba服务器
- 图文混合PDF转换成Word方法介绍 PDF转换器下载
- jquery的ajax使用注意事项
- Python:用lxml解析HTML
- Linux 下 perforce命令行工具 p4的配置
- c#学习笔记2
- FreeBSD 安装配置samba服务器[samba36版本]
- UIWebview JS 交互
- 何为人脉?句句经典 陈安之机构夏宇推荐
- 外网访问XAMPP失败 解决方案 XAMPP1.8.3
- (二)排序和顺序统计学
- shell 乱码问题
- [存档]python并发 multiprocessing 例子
- 奥巴马称钓鱼岛适用日美安保条约 中方回应
- 给CentOS 6安装Tomcat 7,并自启动