انجمنهای فارسی اوبونتو
کمک و پشتیبانی => شبکه و سرویس دهندهها => نویسنده: ریاضی در 22 اردیبهشت 1386، 08:23 بظ
-
اشتراک فایل و پوشه (اوبونتو - سامبا - ویندوز)
اول از همه چیز می بایست که ماشین اوبونتوی شما به یک شبکه متصل باشد و بتواند دیگر کامپیوتر ها را ببیند. به احتمال زیاد شما این شبکه را از قبل داشته اید که همکنون اینجا هستید و مشغول مطالعه این مقاله می باشید.
قدم اول
با استفاده از منوی اصلی سیستم به:
System > Administration > Network
پنجره Network-Settings باز خواهد شد. در قست General فیلد Hostname: را به دلخواه خود نام گذاری کنید.
برای مثال: Hostname:ubuntu
توجه این اسم بعدا در ویندوز برای دسترسی به ماشین اوبونتو استفاده خواهد شد. پس سعی داشته باشید که اسم با معنی برای ماشین خود انتخاب کنید.
دکمه Close را فشار دهید.
(http://forum.ubuntu-ir.org/index.php?action=dlattach;topic=753.0;attach=98;image)
قدم دوم
دوباره از منوی اصلی سیستم System > Administraion > sharedFolders را انتخاب کنید و در قسمت Gneral Properties نام domain را وارد کنید.
ممکن است وقتی که پنجره را برای اولین بار باز می کنید سیستم بخواهد فایل ها و بسته های لازم را جهت به راه اندازی سرویس سامبا نصب کند، اگر چنین پیغامی دریافت کردید بگذارید تا کار دانلود و نصب ماشین تمام شود و سپس مراحل بعدی را طبق راهنما ادامه دهید.
معمولا نام domain همان MSHOME می باشد، اما اگر درون domain دیگری قرار دارید این فیلد را عوض کنید. اگر که نمی دانید و یا از نام domain خود با خبر نیستسد همان MSHOME را استفاده کنید.
(http://forum.ubuntu-ir.org/index.php?action=dlattach;topic=753.0;attach=100;image)
قدم سوم
یک پنجره Terminal را باز کنید و در آن دستورات زیر را وارد نمایید. توجه در این قسمت حواس خود را جمع کنید چون تنها مکانی که ممکن است کمی پیچیده باشد اینجا است.
sudo gedit /etc/samba/smb.conf
ممکن است سیستم از شما کلمه عبور root را بخواهد در اینصورت وارد نمایید و دکمه enter را فشار دهید.
حال پنجره gedit که شبیه نرم افزار notepad ویندوز است در مقابل شما باز شده و حاوی فایل smb.conf می باشد. با استفاده از دکمه find در بالای پنجره برای عبارت "browseable" جستجو کنید. در اینجا چیزی را که باید تغییر دهید بصورت زیر آمده است:
; browseable = yes
تبدیل به:
browseable = yes
شود. همانطور که در بالا دیدید علامت ; برای comment کردن خط استفاده می شد و با پاک کردن آن ما اجازه می دهیم که دایرکتوری و یا پوشه های به اشتراک گذارده شده قابل رویت شوند.
کم پایین تر از همان مکان خط:
; writable = no
را به:
writable = yes
تغییر دهید. در واقع علامت ; را حذف و کلمه no را به yes تبدیل کردیم.
فایل را save کنید و برنامه gedit را ببندید.
قدم چهارم
دوباره در ترمینال:
sudo smbpasswd -a hadi
را وارد می نمایید. دقت داشته باشید که در اینجا ما برای سرویس سامبا یک کاربر جدید تعریف می کنیم تا ویندوز و ابونتو بتوانند با یکدیگر ارتباط داشته باشند. نام کاربری را هر چه که بخواهید می توانید قرار دهید.
بعد از وارد کردن دستور فوق سیستم از شما کلمه عبوری برای کاربر تازه تعریف شده درخواست خواهد کرد. کلمه عبور و تایید آن را وارد کنید.
قدم پنج
دستور زیر را در ترمینال وارد کنید:
sudo /etc/init.d/samba reload
در اینجا سرویس سامبا را مجددا فعال می کنیم تا تنظیمات ما اعمال شوند.
بعد از این دستور باید در مقابل کلمه [O.K] را ببینید. ترمینال را ببندید
قدم شش
با استفاده از منوی اصلی به قسمت Places > Network Servers رفته. سیستم شبکه را بررسی خواهد کرد و می بایستی سرور مایکروسافت را نشان دهد. با مشاهده آیکن مربوط به سرور بروی آن دوبار کلیک کنید. حال باید workgroup هایی که در سیستم است را به شما نشان دهد. یکی از آنها همان نامی است که ما قبلا برای workgroup خود انتخاب کردیم. "MSHOME"
در این قسمت شما می توانید ماشینی که بروی آن ویندوز را نصب کرده اید همراه با تمامی پوشه های به اشتراک گذارده شده را تماشا کنید.
قدم پایانی
برای ایجاد یک پوشه در اوبونتو و به اشتراک گذاری آن برای ویندوز کافی است که روی آن راست کلیک کرده و گزینه share folder... را انتخاب کنید. گزینه share through را انتخاب کنید و در آن windows workgroup را انتخاب کنید. همکنون این پوشه قابل استفاده در ویندوز می باشد.
-
سلام
تمام browseable های درون فایل رو باید تغییر بدم؟!
-
سوال بسیار به جایی. نخیر فقط در همون خط.
-
سلام
در قدم دوم: پنجره ای که باز میشه install samba یا install nfs روی اولی که کلیک می کنم یک سری ارور میده
قدم پنجم: etc/init.d/ samba reload : command not found /
قدم هفتم: باز شدن share folder غیر از add تمام گزینه هایش غیر فعال هستند
-
سلام
در قدم دوم: پنجره ای که باز میشه install samba یا install nfs روی اولی که کلیک می کنم یک سری ارور میده
قدم پنجم: etc/init.d/ samba reload : command not found /
قدم هفتم: باز شدن share folder غیر از add تمام گزینه هایش غیر فعال هستند
در ضمن وقتی روی یک پوشه کلیک می کنم گزینه ای به نام share folder ندارم
-
در پاسخ به سوال اولتون آیا مخازن را در source.list دارین؟ در رابطه با سوال های بعدی اول بایستی قدم اول درست انجام بشه تا بعدی ها هم کار کنند
-
سلام
این sources.list من است
deb cdrom:[Ubuntu 6.06.1 _Dapper Drake_ - Release i386 (20060806.1)]/ dapper main restricted
deb cdrom:[Ubuntu-Server 6.06.1 _Dapper Drake_ - Release i386 (20060807.1)]/ dapper main restricted
deb http://ir.archive.ubuntu.com/ubuntu/ dapper main restricted
deb-src http://ir.archive.ubuntu.com/ubuntu/ dapper main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ir.archive.ubuntu.com/ubuntu/ dapper-updates main restricted
deb-src http://ir.archive.ubuntu.com/ubuntu/ dapper-updates main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb http://ir.archive.ubuntu.com/ubuntu/ dapper universe
# deb-src http://ir.archive.ubuntu.com/ubuntu/ dapper universe
## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://ir.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
# deb-src http://ir.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu dapper-security main restricted
deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted
# deb http://security.ubuntu.com/ubuntu dapper-security universe
# deb-src http://security.ubuntu.com/ubuntu dapper-security universe
خواهشا راهنمایی کنید چون من نیاز خیلی خیلی فوری دارم :( :(
-
سلام با این یک امتحان کنید
-
راهنمای فوقالعاده مفید و بسیار کاربردی هست. ممنون آقای ریاضی برای زحمتی که برای تهیش کشیدید... دستتون درد نکنه :)
در مورد مشکل مهمان عزیز هم:
دستورات زیر رو اجرا کنید و خروجی رو برامون بگذارید...
۱. به اینترنت متصل بشید
۲.
sudo apt-get update
sudo apt-get install samba smbfs
ضمنا بچهها بهتره برای سوالاتتون پست جدید درست کنید...
ضمنا source.list پیشنهادی آقای ریاضی مربوط به Ubuntu 7.04 هست و نباید روی Ubuntu 6.06 استفاده بشه.
-
سلام
ببخشید برای اینکه پست جدید درست نکردم چون با این پست بهتر اشکالاتم را توضیح می دادم و طرفی که جواب میداد راحتتر بود در ضمن با دستور pppcofig من به اینترنت وصل نشدم (البته زیاد وارد نیستم در این زمینه توی اوبنتو) میشه کمکم کنید تا سریعتر مشکلم حل شه :(
تا به اینترنت وصل نشم که کاری نمی توانم بکنم
-
یک کم جستجو کنید خیلی پست ها هست که در رابطه با این مطلبه.
-
حتما جواب نگرفتم که دوباره مطرح کردم
-
سلام
ببخشید برای اینکه پست جدید درست نکردم چون با این پست بهتر اشکالاتم را توضیح می دادم و طرفی که جواب میداد راحتتر بود در ضمن با دستور pppcofig من به اینترنت وصل نشدم (البته زیاد وارد نیستم در این زمینه توی اوبنتو) میشه کمکم کنید تا سریعتر مشکلم حل شه :(
تا به اینترنت وصل نشم که کاری نمی توانم بکنم
سلام !
من بر گشتم !!
خوب دوست من بگو چه اروری می ده ! کدوم مرحله به مشکل بر می خوره ؟ مودمت چه نوعی هست ؟ خروجی شبکه داره یا USB ؟
-
سلام !
من بر گشتم !!
سلام. خوش اومدید ;)
-
در ضمن با دستور pppcofig من به اینترنت وصل نشدم (البته زیاد وارد نیستم در این زمینه توی اوبنتو) میشه کمکم کنید تا سریعتر مشکلم حل شه :(
تا به اینترنت وصل نشم که کاری نمی توانم بکنم
به انجمن سختافزار و مودم سری بزنید تا با انواع مودم و روش نصبشون بیشتر آشنا بشید. اگر هم نتونستید با مودم به اینترنت وصل بشید، برای نصب بستهها میتونید از سیدی هما استفاده کنید...
-
سلام سی دی هما را از کجا تهیه کنم لینک بدید (اوبنتو 6.06)
-
از روشی که معرفی کرده بودید استفاده کردم و سیستم سامبا رو راه انداختم و تونستم فایل ها رو share کنم. ولی ۲تا مشکل برام پیش اومده:
۱- وقتی که دستور sudo smbpasswd -a hadi رو وارد می کنم، خطای زیر رو از من می گیره (البته توزری که دارم وارد می کنم hadi نیست):
mehdi@mehdi-laptop:~$ sudo smbpasswd -a ubuntu_share
New SMB password:
Retype new SMB password:
Failed to initialise SAM_ACCOUNT for user ubuntu_share. Does this user exist in the UNIX password database ?
Failed to modify password entry for user ubuntu_share
mehdi@mehdi-laptop:~$
وقتی هم که از توی یکی دیگه از کامپیوتر های شبکه، می زنم که فایل های share شده کامپیوتر خودم رو بیاره، هر username و passwordi هم که بزنم باز اجازه دیدن فایل های share رو نمی ده. حتی از یوزر root و پسورد اون هم استفاده کردم باز اجازه دیدن فولدر های share شده رو بهم نداد. این مشکل رو چه جوری می تونم برطرف کنم ؟؟
۲- به چه طریق می تونم فایل های share شده توسط کامپیوتر های دیگه شبکه رو لود کنم و بیارمشون ؟
ممنون :)
-
خوب آقا مهدی چرا می خوایین از یوزر آقای ریاضی استفاده کنین ؟ ;)
یوزر خودتون رو به جای یوزر hadi بنویسن
-
با سلام
من در ابونتو 7.10 دستورات و مراحل زیر را کامل انجام می دهم هیچ پیغام خطایی نیز دریافت نمی کنم.
فقط در قدم سوم نمی دونم که کدوم browseable و writable را باید تغییر بدم که من همه اونها را تغییر می دهم و هیچ پیغام خطایی دریافت نمی کنم ولی نه میزبان و نه میهمان هیچکدام همدیگر را نمی شناسند.
-
وقتی از داخل ویندوز میرید و شبکه رو باز می کنید (یا که IP کامپیوتر اوبونتو رو وارد address bar می کنید،) چه اتفاقی می افته ؟ کامپیوتر ها می تونن همدیگه رو ping کنن ؟
-
نه اصلاْ هه دیگه را نمی شناسند.نه توی network ابونتو و نه workgroup ویندوز.
-
چک که فایروال ویندوز باید خاموش باشه تا بتونه کامپیوتر ها رو روی شبکه پیدا کنه، می تونید خروجی دستورات زیر رو برامون بزارین:
ifconfig
dpkg -l samba smbfs
و در داخل ویندوز هم خروجی دستور زیر:
ipconfig /all
-
سلام
خوشبختانه مشکل من حل شد. اما فکر نکنم با روش ها ی بالا بشه که ویندوز داخل vbox را با ابونتو شبکه کرد.
-
ببخشید که تاپیک قدیمی رو بالا میارم . من تو محیط kde اصلا نمی تونم شاخه ای رو به اشترتگ بگذارم و تو smb:// هم اصلا دیده نمی شه . علتش چیه ؟
-
ببخشید که تاپیک قدیمی رو بالا میارم . من تو محیط kde اصلا نمی تونم شاخه ای رو به اشترتگ بگذارم و تو smb:// هم اصلا دیده نمی شه . علتش چیه ؟
نمی تونید به اشتراک بگذارید یا نمی تونید ببینید؟
رابط گرافیکیش مشکل داره و بعضی اوقات خوب کار نمی کنه ( البته فقط من تو کوبونتو این مشکل رو داشتم :) )
پیشنهاد می کنم یا دستی فایل smb.conf رو ویرایش کنید یا از رابط system-config-samba استفاده کنید
البته اگه خواستید از رابط کرافیکی استفاده کنید قبل برید در فایل smb.conf و تنظیمات قبلی که با رابط kde کرده بودید پاک کنید ( یا با برنامه گافیکی لینک رو یکبار بردارید و save کنید و بعد shareد کنید )
-
راستش الان خطایی تو share نمیده ولی باز هم نشون داده نمیشه . فایل smb.conf هم ویرایشش کردم نمیشه default کنمش ؟
-
سلام سی دی هما را از کجا تهیه کنم لینک بدید (اوبنتو 6.06)
اول سلام ب اون دوست مهمان عزیز امون! بچه ها یکمی :oops: ...
ببین عزیزم اگه نت هم نداری روی لینوکس ات! ی راه یکمی دشوار هستش و آن هم دانلوذ بسته ها به صورتی مجرا هستش! یعنی از همین ویندوز ات!
برای اون رو تا بسته هم من با فرض اینکه پردازنده ی اینل دارید! دوتا لینک بهم میدم که می تونی از دنلود اشون کنی! همون دوتا بسته ی مورد نیاز رو!
امید وارم مشکلی وابستگی نداشته باشید البته! و اگه بود باید اسم اون بسته هایی رو که نیاز هستش و می خواد ازتون رو در لینک سوم جستجو کنید و به صورتی دستی دانلود کنید :)
ک البته هردوتا شون هم کلی وابستگی دارند :)
اما اگه نسخه ی DVD هم داشتید نیازی به دنلود نداشتید دیگه! ضمنا این لینک ها برای Gutsy می باشند.
samba (http://security.ubuntu.com/ubuntu/pool/main/s/samba/samba_3.0.26a-1ubuntu2.3_i386.deb)
smbfs (http://security.ubuntu.com/ubuntu/pool/main/s/samba/smbfs_3.0.26a-1ubuntu2.3_i386.deb)
جستجوی بسته ها (http://packages.ubuntu.com)
-
راستش الان خطایی تو share نمیده ولی باز هم نشون داده نمیشه . فایل smb.conf هم ویرایشش کردم نمیشه default کنمش ؟
میشه تنظیمات مربوط به اون فولدر رو از smb.conf بذارید اینجا؟ :)
-
#
# 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
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentary and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic
# errors.
#
#======================= Global Settings =======================
[global]
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = workgroup
# server string is the equivalent of the NT Description field
server string = %h server
# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
; wins support = no
# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z
# If we receive WINS server info from DHCP, override the options above.
include = /etc/samba/dhcp.conf
# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no
# What naming service and in what order should we use to resolve host names
# to IP addresses
; name resolve order = lmhosts host wins bcast
#### Networking ####
# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
; interfaces = 127.0.0.0/8 eth0
# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself. However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
; bind interfaces only = true
#### Debugging/Accounting ####
# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m
# Put a capping on the size of the log files (in Kb).
max log size = 1000
# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
; syslog only = no
# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
syslog = 0
# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d
####### 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
# You may wish to use password encryption. See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
encrypt passwords = true
# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
passdb backend = tdbsam
obey pam restrictions = yes
guest account = nobody
invalid users = root
# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
; unix password sync = no
# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no
########## Domains ###########
# Is this machine able to authenticate users. Both PDC and BDC
# must have this setting enabled. If you are the BDC you must
# change the 'domain master' setting to no
#
; domain logons = yes
#
# The following setting only takes effect if 'domain logons' is set
# It specifies the location of the user's profile directory
# from the client point of view)
# The following required a [profiles] share to be setup on the
# samba server (see below)
; logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
; logon path = \\%N\%U\profile
# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
; logon drive = H:
; logon home = \\%N\%U
# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
; logon script = logon.cmd
# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe. The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
########## Printing ##########
# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
; load printers = yes
# lpr(ng) printing. You may wish to override the location of the
# printcap file
; printing = bsd
; printcap name = /etc/printcap
# CUPS printing. See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
; printing = cups
; printcap name = cups
# When using [print$], root is implicitly a 'printer admin', but you can
# also give this right to other users to add drivers and set printer
# properties
; printer admin = @ntadmin
############ Misc ############
# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /home/samba/etc/smb.conf.%m
# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
# for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY
# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
; domain master = auto
# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash
;
; The following was the default behaviour in sarge
; but samba upstream reverted the default because it might induce
; performance issues in large organizations
; See #368251 for some of the consequences of *not* having
; this setting and smb.conf(5) for all details
;
; winbind enum groups = yes
; winbind enum users = yes
#======================= Share Definitions =======================
wins support = yes
[homes]
comment = Home Directories
browseable = yes
# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
writable = yes
# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
create mask = 0700
# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0700
# Restrict access to home directories
# to the one of the authenticated user
# This might need tweaking when using external authentication schemes
valid users = %S
# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
; comment = Network Logon Service
path = /home/samba/netlogon
guest ok = yes
writable = no
share modes = no
# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
; comment = Users profiles
; path = /home/samba/profiles
; guest ok = no
; browseable = no
; create mask = 0600
; directory mask = 0700
[printers]
comment = All Printers
browseable = yes
path = /var/spool/samba
printable = yes
public = no
writable = yes
create mode = 0700
# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = yes
# Uncomment to allow remote administration of Windows print drivers.
# Replace 'ntadmin' with the name of the group your admin users are
# members of.
; write list = root, @ntadmin
# A sample share for sharing your CD-ROM with others.
;[cdrom]
comment = Samba server's CD-ROM
writable = no
locking = no
path = /media/cdrom
public = yes
# The next two parameters show how to auto-mount a CD-ROM when the
# cdrom share is accesed. For this to work /etc/fstab must contain
# an entry like this:
#
# /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
# is mounted on /cdrom
#
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom
[Desktop]
path = /home/mahdi/Desktop
comment = Desktop on Linux
available = yes
browseable = yes
public = yes
writable = yes
[a]
path = /home/mahdi/Desktop/downloads
comment = a
available = yes
browseable = yes
public = yes
[MAHDIDESKTOP]
path = /home/mahdi/Desktop/
comment = /home/mahdi/Desktop/
public = yes
guest ok = yes
writable = no
wide links = no
-
مثلاً برای دایرکتوری آخری از comment به بعد پاک کنید ( خط بعدش) و اینا رو به جاش بگذارید و samba رو دوباره راه اندازی کنید
security = share
browseable = yes
public = yes
writable = yes
-
کاری از پیش نبردم . مشکل این جا هم هستش که همدیکه رو به راحتی پینگ می کنن ولی نه smb4k و نه کانکرر قادر به نمایش شاخه های به اشتراک گذاری شده نیست
-
کاری از پیش نبردم . مشکل این جا هم هستش که همدیکه رو به راحتی پینگ می کنن ولی نه smb4k و نه کانکرر قادر به نمایش شاخه های به اشتراک گذاری شده نیست
رو هر ماشین با namp localhost ببینید اینارو داریر یا نه
139/tcp open netbios-ssn
445/tcp open microsoft-ds
فایروالتون هم برای امتحان یک بار ببنید
در addressbar اینو بزنید
smb://192.168.1.1
ip ماشینی که می خواید فایلها رو ببینید ( برای ماشین خودتون localhost)
-
وقتی smb://192.168.0.1 رو میزنم بلی نشون میده ولی وقت می زنم /:smb که خودش نشون بده . نه اصلا . فایروالی هم نصب نکردم .
اون دو تا خط بلی وقتی پورت رو اسکن می کنم نشون میده
-
وقتی smb://192.168.0.1 رو میزنم بلی نشون میده ولی وقت می زنم /:smb که خودش نشون بده . نه اصلا . فایروالی هم نصب نکردم .
اون دو تا خط بلی وقتی پورت رو اسکن می کنم نشون میده
خب پس samba تون مشکلی نداره و داره کار می کنه ؟:)
و فقط workgroup رو اون اول نشون نمیده؟
یعنی با آدرس مستقیم می تونید بهش وصل بشید دیگه؟
-
با آدرس مستقیم به کیس دیگه نه . فقط میتونم پینگش کنم .
بلی ورک گروپ رو نشون نمی ده .
کیس بعدی که آدرسش 192.168.0.1 هستش پینگ میشه ولی با آدرس smb:/192.168.0.1 نمی تونم وصل بشم
-
با آدرس مستقیم به کیس دیگه نه . فقط میتونم پینگش کنم .
بلی ورک گروپ رو نشون نمی ده .
کیس بعدی که آدرسش 192.168.0.1 هستش پینگ میشه ولی با آدرس smb:/192.168.0.1 نمی تونم وصل بشم
البته این درسته
smb://192.168.0.1
اگه اینم مشکل داشت :)
فایروال هم همراه کرنلتون هست :)
sudo iptables -A INPUT -p udp -d $SAMBA_SERVER -m multiport --dports 137,138 -j DROP
sudo iptables -A INPUT -p tcp -d $SAMBA_SERVER -m multiport --dports 139,445 -j DROP
به جای $SAMBA_SERVER
ip ماشین مقابل رو بدید ( در هر دو)
می تونید یک رابط گرافیکی هم براش نصب کنید
firestarter یکیشه ( خیلی رابط های زیادی داره و این ساده ترینشونه kmyfirewall هم هست )
-
سلام . باز هم تاثیری نداشت متاسفانه .
-
الان وقتی /:smb رو میزنم خطای فایروال و workgroup رو میده
-
الان وقتی /:smb رو میزنم خطای فایروال و workgroup رو میده
اگه می شه خروجی
iptables -L
رو بگو
می تونی firstarter نصب کنی و ببینی وقتی stop اش می کنی فرق می کنه یا نه؟
-
debian:/home/mahdi# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
تا جایی که فهمیدم فرقی نکرده
kmyfirewall رو نصب کردم و تنظیمش هم کردم ولی باز هم تاثیری نداشت
اکثر این خطا رو میبینم : Unable to find any workgroups in your local network. This might be caused by an enabled firewall.
-
وقتی اینارو می زدی چیزی نگفت؟
sudo iptables -A INPUT -p udp -d $SAMBA_SERVER -m multiport --dports 137,138 -j DROP
sudo iptables -A INPUT -p tcp -d $SAMBA_SERVER -m multiport --dports 139,445 -j DROP
چون باید تو iptables -nL نشونشون بده ( دوباره بزن چک کن)
ip ماشین مقابل یادت نره :)
-
راستش هیچ چیزی نگفت و نشون نداد . آی پی رو هم دادم
برای ماشین اول :
sudo iptables -A INPUT -p udp -d $192.168.0.1 -m multiport --dports 137,138 -j DROP
sudo iptables -A INPUT -p tcp -d $192.168.0.1 -m multiport --dports 139,445 -j DROP
برای ماشین دوم هم :
sudo iptables -A INPUT -p udp -d $192.168.0.2 -m multiport --dports 137,138 -j DROP
sudo iptables -A INPUT -p tcp -d $192.168.0.2 -m multiport --dports 139,445 -j DROP
-
راستش هیچ چیزی نگفت و نشون نداد . آی پی رو هم دادم
برای ماشین اول :
sudo iptables -A INPUT -p udp -d $192.168.0.1 -m multiport --dports 137,138 -j DROP
sudo iptables -A INPUT -p tcp -d $192.168.0.1 -m multiport --dports 139,445 -j DROP
برای ماشین دوم هم :
sudo iptables -A INPUT -p udp -d $192.168.0.2 -m multiport --dports 137,138 -j DROP
sudo iptables -A INPUT -p tcp -d $192.168.0.2 -m multiport --dports 139,445 -j DROP
علامت $ برای نمایش متغیر هست :)
نباید قبلش اینو بذارید
یکبار
iptables -f
و بعد دوباره این کار رو بکنید
باید بعد از این کار این دوتا رو در iptables -nL ببینید :)
-
فکر کنم یه اشتباهی کردم
اینو امتحان کنید
فکر کنم بر عکس فیلتر کرده بودم :(
از رول های خودم دادم که اون زمان بسته بودمش و الان یادم افتاد
sudo iptables -F
sudo sudo iptables -A INPUT -p udp -d 192.168.0.1 -m multiport --dports 137,138 -j ACCEPT
sudo iptables -A INPUT -p tcp -d 192.168.0.1 -m multiport --dports 139,445 -j ACCEPT
sudo iptables -A INPUT -p udp -d 192.168.0.2 -m multiport --dports 137,138 -j ACCEPT
sudo iptables -A INPUT -p tcp -d 192.168.0.2 -m multiport --dports 139,445 -j ACCEPT
-
ولی تا اونجایی که مشخصه کدها فرقی نکردن درسته ؟
باز هم امتحان کردم ولی تاثیری باز نداشت . یعنی شاخه های share شده و هیچ جیز نشون داده نمیشه
-
ولی تا اونجایی که مشخصه کدها فرقی نکردن درسته ؟
باز هم امتحان کردم ولی تاثیری باز نداشت . یعنی شاخه های share شده و هیچ جیز نشون داده نمیشه
تو iptables نیومده؟
iptables -nL
drop به accept تغییر کرده
-
این یه خروجی از دستوری که دادین .
debian:/home/mahdi# iptables -n -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- 0.0.0.0/0 192.168.0.2 multiport dports 137,138
ACCEPT tcp -- 0.0.0.0/0 192.168.0.2 multiport dports 139,445
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
debian:/home/mahdi#
روند کار تغییری نکرده
-
این یه خروجی از دستوری که دادین .
debian:/home/mahdi# iptables -n -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- 0.0.0.0/0 192.168.0.2 multiport dports 137,138
ACCEPT tcp -- 0.0.0.0/0 192.168.0.2 multiport dports 139,445
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
debian:/home/mahdi#
روند کار تغییری نکرده
فقط یه چیز دیگه به ذهنم می رسه
اصلاً اون دایرکتوری که دارید به اشتراک می گذارید دسترسی داره؟
باchmod 777 /path امتحان کنید
اگر این هم نبود یه بار باید از اول همه مراحل و تنظیمات رو کنترل کنیم
-
بلی دسترسی داره.
-
sudo smbclient -L localhost
این رو رو سیستمی که دارید فاسل share می کنید بزنید
و پسورد رو وارد نکنید و enter بزنید
خروجیش چیه؟
خروجی
sudo testparm
رو هم بدید
-
debian:/home/mahdi# smbclient -L localhost
Error connecting to 127.0.0.1 (Connection refused)
Connection to localhost failed
debian:/home/mahdi# smbclient -L 192.168.0.2
Error connecting to 192.168.0.2 (Connection refused)
Connection to 192.168.0.2 failed
debian:/home/mahdi#
خروجی دستور آخر :
debian:/home/mahdi# testparam
bash: testparam: command not found
debian:/home/mahdi#
-
اصلاً مطمئنی رو سیستمت samba نصب کردی؟ :o
sudo apt-get install samba smbfs smbclient
اگر نصب نبود خروجی دستورات قبل رو بگو
testparm بود a اضافه خورده بود
-
آره بابا . مطمئن هستم
خروجی :
debian:/home/mahdi# apt-get install samba smbfs smbclient
Reading package lists... Done
Building dependency tree... Done
samba is already the newest version.
smbfs is already the newest version.
smbclient is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
debian:/home/mahdi#
الان دبیان کلاینت اوبونتو رو میشناسه و اون رو تو //:smb راحت نشون میده ولی هنوز دبیان خودش خودشو نمیشناسه
-
خروجی دستور آخری:
debian:/home/mahdi# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Global parameter security found in service section!
Processing section "[cdrom]"
Global parameter security found in service section!
NOTE: Service cdrom is flagged unavailable.
Processing section "[Desktop]"
Global parameter security found in service section!
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
server string = debian
obey pam restrictions = Yes
passdb backend = tdbsam
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
panic action = /usr/share/samba/panic-action %d
invalid users = root
include = /etc/samba/dhcp.conf
[homes]
comment = Home Directories
path = /home/samba/netlogon
valid users = %S
read only = No
create mask = 0700
directory mask = 0700
guest ok = Yes
[printers]
comment = All Printers
path = http://debian:631/printers/SAMSUNG-ML-2510
read only = No
create mask = 0700
guest ok = Yes
printable = Yes
browseable = No
[print$]
comment = Printer Drivers
path = http://debian:631/printers/SAMSUNG-ML-2510
guest ok = Yes
[cdrom]
comment = Samba server's CD-ROM
path = /media/cdrom1
read only = No
guest ok = Yes
browseable = No
locking = No
available = No
[Desktop]
comment = /home/mahdi/Desktop/
path = /home/mahdi/Desktop
read only = No
guest ok = Yes
debian:/home/mahdi#
-
sudo smbclient -L localhost
یا
sudo smbclient -L 127.0.0.1
اگه همون قبلی بود اینم بذارید
sudo /etc/init.d/samba status
حداقل خوبه کلاینت کار می کنه :)
-
تا جایی که آقای تقوی فرمودند مشکل این هستش که سرور دبیان بالا نیست چون Connection refused میده و الان موندم چطوری اینو درستش کنم
-
تا جایی که آقای تقوی فرمودند مشکل این هستش که سرور دبیان بالا نیست چون Connection refused میده و الان موندم چطوری اینو درستش کنم
تو سرور دبیان می تونید اینطوری مطمئن بشید
sodo /etc/init.d/samba status
بهتون می گه سرویس در چه وضعیتی هست
sodo nmap localhost
و این یکی هم که در سرور بنویسید معلوم میشه ودرت هاش باز هست یا نه ( سورویس قابل دستیابی هست یا نه)
sodo /etc/init.d/samba start
می تونید سرویس رو استاررت کنید
همگی این دستورات رو در سرور بزنید
-
بلاخره این kubuntu جدید دستم رسید می خوام دوباره برگردم روش امشب دیگه نصبش می کنم . لیو سی دیش عالی بود امیدوارم که پایدار باشه مثل دبیان
از کمکتون هم بسیار بسیار سپاسگذارم خیلی بهتون زحمت دادم و کلی ازتون چیز یاد گرفتم قربونت مهدی
باز مشکلی بود می پرسم
-
باز هم سلام.
من الان کوبونتو-اوئبونتو رو رو سیستمم نصب کردم . کلاینت بعدی هم ویندوز داره هم اوبونتو . ولی فقط خودشونو میشناسن و نه همدیگه رو . فایل سامبا رو هم دستی کانفیگ کردم .
این بار همدیگه رو پینگ هم نمی کنن ولی وقتی کابل شبکه رو جدا میکنم از کلاینت کلاینت بعدی میگه که کابل جدا شد .
-
باز هم سلام.
من الان کوبونتو-اوئبونتو رو رو سیستمم نصب کردم . کلاینت بعدی هم ویندوز داره هم اوبونتو . ولی فقط خودشونو میشناسن و نه همدیگه رو . فایل سامبا رو هم دستی کانفیگ کردم .
این بار همدیگه رو پینگ هم نمی کنن ولی وقتی کابل شبکه رو جدا میکنم از کلاینت کلاینت بعدی میگه که کابل جدا شد .
خروجی های ifconfig رو در هر دو بگید
ip و تنظیمات ویندوز رو هم بگید
-
من روی لینوکس فقط آی پی دادم با تنظیمات دیفالت همدیگه رو نشناختن .
روی ویندوز هم فایروال رو کلبا غیرفعال کردم و یه آی پی بهش دادم
دستوراتی که شما گفتین رو هم انجام دادم ولی تاثیری باز نداشت
-
من روی لینوکس فقط آی پی دادم با تنظیمات دیفالت همدیگه رو نشناختن .
روی ویندوز هم فایروال رو کلبا غیرفعال کردم و یه آی پی بهش دادم
دستوراتی که شما گفتین رو هم انجام دادم ولی تاثیری باز نداشت
خروجی ifconfig رو بدید :)
بعد از تنظیمات هم networking رو reset کنید ببینید شاید تغییر نکرده
-
بفرمایید
eth0 Link encap:Ethernet HWaddr 00:15:e9:86:ed:6e
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2354 errors:0 dropped:0 overruns:0 frame:0
TX packets:862 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:199112 (194.4 KB) TX bytes:129215 (126.1 KB)
Interrupt:26 Base address:0xac00
eth0:avahi Link encap:Ethernet HWaddr 00:15:e9:86:ed:6e
inet addr:169.254.9.84 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:26 Base address:0xac00
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:22798 errors:0 dropped:0 overruns:0 frame:0
TX packets:22798 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:16758645 (15.9 MB) TX bytes:16758645 (15.9 MB)
ubuntu@ubuntu:~$ sudo ifconfig eth0 192.168.0.1 up
ubuntu@ubuntu:~$ sudo ifconfig
eth0 Link encap:Ethernet HWaddr 00:15:e9:86:ed:6e
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2354 errors:0 dropped:0 overruns:0 frame:0
TX packets:870 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:199112 (194.4 KB) TX bytes:130084 (127.0 KB)
Interrupt:26 Base address:0xac00
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:22798 errors:0 dropped:0 overruns:0 frame:0
TX packets:22798 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:16758645 (15.9 MB) TX bytes:16758645 (15.9 MB)
ubuntu@ubuntu:~$ tracepath 192.168.0.1
1: ubuntu.local (192.168.0.1) 0.114ms pmtu 16436
1: ubuntu.local (192.168.0.1) 0.062ms reached
1: ubuntu.local (192.168.0.1) 0.022ms reached
Resume: pmtu 16436 hops 1 back 64
ubuntu@ubuntu:~$ tracepath 192.168.0.3
1: ubuntu.local (192.168.0.1) 0.157ms pmtu 1500
1: no reply
2: no reply
3: no reply
ubuntu@ubuntu:~$
IP 192.168.0.3 ماله ویندوزه
-
من میخوام یک وشه ای به اشتراک بزارم با این پیغام مواجه میشم
'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error Permission denied
You do not have permission to create a usershare. Ask your administrator to grant you permissions to create a share.
-
من میخوام یک وشه ای به اشتراک بزارم با این پیغام مواجه میشم
'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error Permission denied
You do not have permission to create a usershare. Ask your administrator to grant you permissions to create a share.
باید دسترسی root داشته باشید :) ( یا یوزری که بهش این اجازه رو داده اید)
- goto system>administration>users and groups
- Unlock
- click on Manage Groups
- select sambashare
- click Properties
- unselect and select your user
- click OK
-
بفرمایید
eth0 Link encap:Ethernet HWaddr 00:15:e9:86:ed:6e
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2354 errors:0 dropped:0 overruns:0 frame:0
TX packets:862 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:199112 (194.4 KB) TX bytes:129215 (126.1 KB)
Interrupt:26 Base address:0xac00
eth0:avahi Link encap:Ethernet HWaddr 00:15:e9:86:ed:6e
inet addr:169.254.9.84 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:26 Base address:0xac00
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:22798 errors:0 dropped:0 overruns:0 frame:0
TX packets:22798 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:16758645 (15.9 MB) TX bytes:16758645 (15.9 MB)
ubuntu@ubuntu:~$ sudo ifconfig eth0 192.168.0.1 up
ubuntu@ubuntu:~$ sudo ifconfig
eth0 Link encap:Ethernet HWaddr 00:15:e9:86:ed:6e
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2354 errors:0 dropped:0 overruns:0 frame:0
TX packets:870 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:199112 (194.4 KB) TX bytes:130084 (127.0 KB)
Interrupt:26 Base address:0xac00
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:22798 errors:0 dropped:0 overruns:0 frame:0
TX packets:22798 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:16758645 (15.9 MB) TX bytes:16758645 (15.9 MB)
ubuntu@ubuntu:~$ tracepath 192.168.0.1
1: ubuntu.local (192.168.0.1) 0.114ms pmtu 16436
1: ubuntu.local (192.168.0.1) 0.062ms reached
1: ubuntu.local (192.168.0.1) 0.022ms reached
Resume: pmtu 16436 hops 1 back 64
ubuntu@ubuntu:~$ tracepath 192.168.0.3
1: ubuntu.local (192.168.0.1) 0.157ms pmtu 1500
1: no reply
2: no reply
3: no reply
ubuntu@ubuntu:~$
IP 192.168.0.3 ماله ویندوزه
i don't know :(
این جور تنظیم ها بدون دسترسی به سیستم سخته
یه بار سامبا با مخلفاتش رو پرج کن ( purge ) و دوباره نصب کن و قدم قدم چیزایی رو که گفتم امتحان کن :)
-
با استفاده از منوی اصلی سیستم به:
کد:
System > Administration > Network
پنجره Network-Settings باز خواهد شد. در قست General فیلد Hostname: را به دلخواه خود نام گذاری کنید.
برای مثال: Hostname:ubuntu
توجه این اسم بعدا در ویندوز برای دسترسی به ماشین اوبونتو استفاده خواهد شد. پس سعی داشته باشید که اسم با معنی برای ماشین خود انتخاب کنید.
دکمه Close را فشار دهید.
در اوبونتو 8.10 این آدرس کجاست ؟ من اصلا پیدا نکردم !!