求助:UBUNTU和WINDOWS不能共享,该如何设置?谢谢!已解决

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
白鳍豚
帖子: 2356
注册时间: 2009-01-19 23:03

求助:UBUNTU和WINDOWS不能共享,该如何设置?谢谢!已解决

#1

帖子 白鳍豚 » 2009-05-09 18:36

求助:UBUNTU和WINDOWS不能共享,该如何设置?谢谢!
1、现在瘟到死,能看到,但打不开。显示“找不到网络路径“
2、在ubuntu位置→网络→无法挂载
3、如图
screenshot1.png
screenshot1.png (36.87 KiB) 查看 3145 次
防火墙
ufw ubuntu防火墙简单设置
1.安装
sudo apt-get install ufw

2.启用
sudo ufw enable
sudo ufw default deny
运行以上两条命令后,开启了防火墙,并在系统启动时自动开启。
关闭所有外部对本机的访问,但本机访问外部正常。

3.开启/禁用
sudo ufw allow|deny [service]
打开或关闭某个端口,例如:
sudo ufw allow smtp 允许所有的外部IP访问本机的25/tcp (smtp)端口
sudo ufw allow 22/tcp 允许所有的外部IP访问本机的22/tcp (ssh)端口
sudo ufw allow 53 允许外部访问53端口(tcp/udp)
sudo ufw allow from 192.168.1.100 允许此IP访问所有的本机端口
sudo ufw allow proto udp 192.168.0.1 port 53 to 192.168.0.2 port 53
sudo ufw deny smtp 禁止外部访问smtp服务
sudo ufw delete allow smtp 删除上面建立的某条规则

4.查看防火墙状态
sudo ufw status

一般用户,只需如下设置:
sudo apt-get install ufw
sudo ufw enable
sudo ufw default deny
以上三条命令已经足够安全了,如果你需要开放某些服务,再使用sudo ufw allow开启。
补充:

开启/关闭防火墙 (默认设置是’disable’)

# ufw enable|disable

转换日志状态

# ufw logging on|off

设置默认策略 (比如 “mostly open” vs “mostly closed”)

# ufw default allow|deny

许 可或者屏蔽某些入埠的包 (可以在“status” 中查看到服务列表[见后文])。可以用“协议:端口”的方式指定一个存在于/etc/services中的服务名称,也可以通过包的meta-data。 ‘allow’ 参数将把条目加入 /etc/ufw/maps ,而 ‘deny’ 则相反。基本语法如下:

# ufw allow|deny [service]

显示防火墙和端口的侦听状态,参见 /var/lib/ufw/maps。括号中的数字将不会被显示出来。

# ufw status

[注意:上文中虽然没有使用 sudo,但是命令提示符号都是“#”。所以……你知道啥意思了哈。原文如此。──译者注]


UFW 使用范例:

允许 53 端口

$ sudo ufw allow 53

禁用 53 端口

$ sudo ufw delete allow 53

允许 80 端口

$ sudo ufw allow 80/tcp

禁用 80 端口

$ sudo ufw delete allow 80/tcp

允许 smtp 端口

$ sudo ufw allow smtp

删除 smtp 端口的许可

$ sudo ufw delete allow smtp

允许某特定 IP

$ sudo ufw allow from 192.168.254.254

删除上面的规则

$ sudo ufw delete allow from 192.168.254.254
上次由 白鳍豚 在 2009-05-13 0:31,总共编辑 1 次。
头像
白鳍豚
帖子: 2356
注册时间: 2009-01-19 23:03

Re: 求助:UBUNTU和WINDOWS不能共享,该如何设置?谢谢!

#2

帖子 白鳍豚 » 2009-05-09 18:47

#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
# - When such options are commented with ";", the proposed setting
# differs from the default Samba behaviour
# - When commented with "#", the proposed setting is the default
# behaviour of Samba but the option is considered important
# enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic
# errors.
# A well-established practice is to name the original file
# "smb.conf.master" and create the "real" config file with
# testparm -s smb.conf.master >smb.conf
# This minimizes the size of the really used smb.conf file
# which, according to the Samba Team, impacts performance
#

#======================= Global Settings =======================

[global]

workgroup = mshome

server string = ubuntu

security = user
; encrypt passwords = yes
guest ok = yes
guest account = gongxiang
username map = /etc/samba/smbusers

[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
; guest ok = no
; read only = yes
create mask = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers

[Downloads]
path = /windows/sda2/Ubuntu/Downloads
writeable = yes
; browseable = yes
valid users = gongxiang
头像
白鳍豚
帖子: 2356
注册时间: 2009-01-19 23:03

Re: 求助:UBUNTU和WINDOWS不能共享,该如何设置?谢谢!

#3

帖子 白鳍豚 » 2009-05-10 0:38

那位帮忙看看,谢谢!
头像
白鳍豚
帖子: 2356
注册时间: 2009-01-19 23:03

Re: 求助:UBUNTU和WINDOWS不能共享,该如何设置?谢谢!

#5

帖子 白鳍豚 » 2009-05-10 11:15

:em20 :em20
头像
AngelMAX
帖子: 2228
注册时间: 2009-02-25 18:18

Re: 求助:UBUNTU和WINDOWS不能共享,该如何设置?谢谢!

#6

帖子 AngelMAX » 2009-05-10 11:28

第一,先换一个共享名,
第二,把那个允许匿名用户连接的勾上。
第三,让瘟到死的看一下能进了么。
在中国搞IT的谁不知道Ctrl+C,Ctrl+V啊~
头像
白鳍豚
帖子: 2356
注册时间: 2009-01-19 23:03

Re: 求助:UBUNTU和WINDOWS不能共享,该如何设置?谢谢!

#7

帖子 白鳍豚 » 2009-05-10 11:49

瞎折腾出更大问题了 :em06
sudo /etc/init.d/samba restart
* Stopping Samba daemons [ OK ]
* Starting Samba daemons [fail]
************:~$ sudo system-config-samba
Traceback (most recent call last):
File "/usr/sbin/system-config-samba", line 45, in <module>
mainWindow.MainWindow(debug_flag)
File "/usr/share/system-config-samba/mainWindow.py", line 116, in __init__
self.samba_user_data = sambaUserData.SambaUserData(self)
File "/usr/share/system-config-samba/sambaUserData.py", line 46, in __init__
self.readSmbPasswords()
File "/usr/share/system-config-samba/sambaUserData.py", line 63, in readSmbPasswords
raise RuntimeError, (_("You do not have permission to execute %s." % pdbeditcmd))
RuntimeError: You do not have permission to execute /usr/bin/pdbedit.
头像
白鳍豚
帖子: 2356
注册时间: 2009-01-19 23:03

Re: 求助:UBUNTU和WINDOWS不能共享,该如何设置?谢谢!

#8

帖子 白鳍豚 » 2009-05-10 13:27

这次又得重装了 :em06
手动删除samba(自动删除出错),把系统密码给干掉了
系统面临第N次重装
瞎折腾修复密码又不知道怎么回事,把显卡驱动给干掉了
没有密码,装不了驱动了
WUBI安装也不能用光驱启动修复 :em20
头像
白鳍豚
帖子: 2356
注册时间: 2009-01-19 23:03

Re: 求助:UBUNTU和WINDOWS不能共享,该如何设置?谢谢!

#9

帖子 白鳍豚 » 2009-05-10 22:28

系统刚安装时能够看到瘟到死共享,升级安装语言包以及以下程序后就不行了,请问和那个有冲突?谢谢!
1、安装sudo apt-get install fbset
2、安装sudo apt-get install mplayer
3、安装rar
sudo apt-get install rar unrar p7zip p7zip-rar p7zip-full
4、安装sudo apt-get install wine
5、安装sudo apt-get install gufw

推荐设置
sudo apt-get install ufw
sudo ufw enable
sudo ufw default deny
查看防火墙状态
sudo ufw status

6、磁盘编辑
sudo apt-get install gparted
7、系统清理
sudo apt-get install gtkorphan
8、安装杀毒
sudo apt-get install clamav
9、解决网页中 Flash 乱码问题
sudo rm /etc/fonts/conf.d/49-sansserif.conf
10、解决mp3乱码的问题
sudo apt-get install easytag exfalso
11、sudo apt-get install libdca-dev
12、安装解码
ubun解码.deb
13、sudo apt-get install nautilus-open-terminal
14、安信
15、安装字体
16、Scim进程僵死
解决方法:
1、sudo gedit /etc/X11/xinit/xinput.d/scim-bridge
把XIM_ARGS=" - d"
改为XIM_ARGS=" "
这样scim 进程显示为“睡眠中“,并且在eva中能继续使用输入法。
17、ubuntu播放清理
rm ~/.recently-used.xbel
mkdir ~/.recently-used.xbel
18、记事本

瘟到死程序桌面快捷方式创建起动器之后,前面加上
env WINEPREFIX="/home/ubuntu/.wine" wine "
后面加


19、启动播放软件,下载安装解码
20、安装插件
Xmarks
chm
mediawrap
DownThemAll
21、安装虚拟光驱sudo apt-get install gmountiso
头像
白鳍豚
帖子: 2356
注册时间: 2009-01-19 23:03

Re: 求助:UBUNTU和WINDOWS不能共享,该如何设置?谢谢!

#10

帖子 白鳍豚 » 2009-05-10 22:32

防火墙? :em20
llc
帖子: 33
注册时间: 2008-09-08 12:08

Re: 求助:UBUNTU和WINDOWS不能共享,该如何设置?谢谢!已解决

#11

帖子 llc » 2009-05-20 21:32

搞定方法如下: 打开终端 输入 sudo gedit /etc/samba/smb.conf 将打开smb.conf文件,Ctrl + F 搜索 “usershare” 在“usershare allow guests = yes”之后敲回车,然后加入“usershare owner only = False” 回车保存退出终端共享 OK
头像
速腾1994
论坛版主
帖子: 17379
注册时间: 2008-11-01 20:43
系统: Arch+gnome

Re: 求助:UBUNTU和WINDOWS不能共享,该如何设置?谢谢!已解决

#12

帖子 速腾1994 » 2009-05-21 14:19

马克@
头像
shellex
帖子: 2180
注册时间: 2007-02-18 19:33
系统: OSX
来自: lyric.im
联系:

Re: 求助:UBUNTU和WINDOWS不能共享,该如何设置?谢谢!已解决

#13

帖子 shellex » 2009-05-21 14:20

用飞鸽系列,最简单
既然你诚心诚意地问了
我就大慈大悲地告诉你
为了防止世界被破坏
为了维护世界的和平
贯彻爱与真实的罪恶
可爱而又迷人的反派角色
武藏,小次郎
我们是穿越银河的火箭队,白洞白色的明天在等着我们。就是这样!!喵~~
头像
白鳍豚
帖子: 2356
注册时间: 2009-01-19 23:03

Re: 求助:UBUNTU和WINDOWS不能共享,该如何设置?谢谢!已解决

#14

帖子 白鳍豚 » 2009-05-21 22:51

呵呵!
/etc/samba/smb.conf
上次这个貌似被咔嚓了
头像
sunnywindir
帖子: 41
注册时间: 2009-04-02 17:59

Re: 求助:UBUNTU和WINDOWS不能共享,该如何设置?谢谢!已解决

#15

帖子 sunnywindir » 2009-05-22 15:12

:em50
太感谢了!
回复