Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
проблемы с samba
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Russian
View previous topic :: View next topic  
Author Message
anonymouss
n00b
n00b


Joined: 30 Jun 2005
Posts: 27
Location: Russia, Tomsk

PostPosted: Mon Sep 19, 2005 3:47 am    Post subject: проблемы с samba Reply with quote

Столкнулся с рядом проблем:
1. в сетевом имени отображается версия сервера: Anonymouss(Samba 3.0.14)
2. не запускается swat, хотя строчка в /etc/services присутствует и в /etc/xinet.d/samba disable = no
3. не могу открыть доступ к ресурсам (пытаюсь открыть 3 ресурса, пускает только к одному /tmp, но и то не во все каталоги)

Code:

[global]
   workgroup = something
   netbios name = anonymouss
   message command = /usr/bin/linpopup "%f" "%m" %s; rm %s
   log file = /var/log/samba3/log.%m
   max log size = 500
   log level = 3
;   server signing = Auto
   guest account = guest
   guest ok = yes
   username map = /etc/samba/smbuser.map

# 4. Security and Domain Membership Options:
;   hosts allow = 192.168.0. 192.168.1.
;   map to guest = bad user
   security = share
   user = guest

  encrypt passwords = yes
  smb passwd file = /usr/sbin/smbpasswd
  winbind use default domain = yes

  socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
;  interfaces = 192.168.0.1/24 192.168.1.1/24
  wins support = yes
; wins proxy = yes
  dns proxy = no

# 8. File Naming Options:
  default case = lower
  case sensitive = no
 dos charset = 850
 unix charset = ISO8859-1


#============================ Share Definitions ==============================
[music]
  comment= Music
  browseable = yes
  path = /windows/multimedia/Music
  public = yes
  read only = no
  guest ok = yes
 
[tmp]
   comment = Temporary file space
   path = /tmp
   read only = yes
   public = yes

[movies]
  comment = Movies
  path = /windows/multimedia/Movie
  read only = yes
  public = yes
  guest ok = yes
Back to top
View user's profile Send private message
cha-chaynik
Tux's lil' helper
Tux's lil' helper


Joined: 18 Feb 2005
Posts: 115
Location: Russia, St.Petersburg

PostPosted: Mon Sep 19, 2005 8:43 am    Post subject: Re: проблемы с samba Reply with quote

anonymouss wrote:
Столкнулся с рядом проблем:
2. не запускается swat, хотя строчка в /etc/services присутствует и в /etc/xinet.d/samba disable = no

Попробуйте к нему подключиться через Webmin.

Если не ошибаюсь, то комментарии строк делаются символом "#", а не ";".

Для начала, попробуйте такую конфигурацию.
Code:

[global]
   workgroup = something
   netbios name = anonymouss
   server string = Samba 3.014
#   message command = /usr/bin/linpopup "%f" "%m" %s; rm %s


   log file = /var/log/samba3/log.%m
   max log size = 500
#   log level = 3
   debug level = 3
#;   server signing = Auto
#   guest account = guest
#   guest ok = yes
#   username map = /etc/samba/smbuser.map

# 4. Security and Domain Membership Options:
#;   hosts allow = 192.168.0. 192.168.1.
#;   map to guest = bad user
   security = share
#   user = guest

  encrypt passwords = yes
# !!!!  smb passwd file = /usr/sbin/smbpasswd
  smb passwd file = /var/lib/samba/private/smbpasswd
  winbind use default domain = yes

  socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
#;  interfaces = 192.168.0.1/24 192.168.1.1/24
  wins support = yes
  wins proxy = yes
  dns proxy = no

# 8. File Naming Options:
#  default case = lower
#  case sensitive = no
# dos charset = 850
# unix charset = ISO8859-1
        unix charset = KOI8-R
        dos charset = CP866


#============================ Share Definitions ==============================
[music]
  comment= Music
  browseable = yes
  path = /windows/multimedia/Music
#  public = yes
  read only = no
  guest ok = yes
 
[tmp]
   comment = Temporary file space
   path = /tmp
   read only = yes
   browseable = yes
#   public = yes

[movies]
  comment = Movies
  path = /windows/multimedia/Movie
  read only = yes
#  public = yes
  guest ok = yes
  browseable = yes
Back to top
View user's profile Send private message
anonymouss
n00b
n00b


Joined: 30 Jun 2005
Posts: 27
Location: Russia, Tomsk

PostPosted: Mon Sep 19, 2005 2:17 pm    Post subject: Reply with quote

Так, с первым пунктом разобрался. С доступом по-прежнему не могу разобраться, если закомментировать public, то вообще не пускает на "ресурс" (в /tmp т.е.).
Back to top
View user's profile Send private message
Plastikman14
Tux's lil' helper
Tux's lil' helper


Joined: 25 Oct 2004
Posts: 137

PostPosted: Mon Sep 19, 2005 6:32 pm    Post subject: Reply with quote

Кстати, а как запустить swat???
Back to top
View user's profile Send private message
cha-chaynik
Tux's lil' helper
Tux's lil' helper


Joined: 18 Feb 2005
Posts: 115
Location: Russia, St.Petersburg

PostPosted: Tue Sep 20, 2005 9:01 am    Post subject: Reply with quote

anonymouss wrote:
Так, с первым пунктом разобрался. С доступом по-прежнему не могу разобраться, если закомментировать public, то вообще не пускает на "ресурс" (в /tmp т.е.).

Теперь Вам нужно создать абсолютно бесправного пользователя в Linux. Пусть это будет "dummy" в группе "dummy". Получится приблизительно так:
/etc/passwd:
Code:

...
dummy:x:700:700:Samba Dummy Account:/dev/null:/bin/false
...


/etc/shadow:
Code:

...
dummy:*:13046::::::
...


/etc/group:
Code:

...
dummy::700:
...


После этого экспортируйте пользователя в Самбу (если не настроена автоматическая синхронизация UNIX и Samba пользователей). Задайте ему пустой пароль.
Создайте в файл /etc/samba/user.map со следующим содержанием:
Code:

dummy=guest
dummy=anonymous
dummy=Гость


Создайте тестовые каталоги, напр. /sambatest1 и /sambatest2 и дайте на них права 777.

Окончательная правка smb.conf:
Code:

[global]
   workgroup = something
   netbios name = anonymouss
   server string = Samba 3.014

   log file = /var/log/samba3/log.%m
   max log size = 500
   debug level = 3

   guest account = dummy
   username map = /etc/samba/user.map

   security = share
   client schannel = yes
   server schannel = yes
   server signing = auto
   os level = 33
   max protocol = NT
   restrict anonymous = no
   null passwords = yes
   encrypt passwords = yes
   paranoid server security = no
   smb passwd file = /var/lib/samba/private/smbpasswd
   winbind use default domain = yes
   

   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   wins support = yes
   wins proxy = yes
   dns proxy = no

   unix charset = KOI8-R
   dos charset = CP866

[test1]
  path = /sambatest1
  browseable = yes
  readonly = no
  guest ok = yes

[test2]
  path = /sambatest2
  browseable = yes
  readonly = yes
  guest ok = yes


[music]
  comment= Music
  browseable = yes
  path = /windows/multimedia/Music
  read only = no
  guest ok = yes
 
[tmp]
   comment = Temporary file space
   path = /tmp
   read only = yes
   browseable = yes

[movies]
  comment = Movies
  path = /windows/multimedia/Movie
  read only = yes
  guest ok = yes
  browseable = yes


Перегрузите Самбу и у любого, прилогинившегося, появятся права на запись в каталог /sambatest1 ( \\something\test1 ) от имени пользователя dummy и группы dummy. И права на чтение в каталоге /sambatest2 ( \\something\test2 ).
Back to top
View user's profile Send private message
anonymouss
n00b
n00b


Joined: 30 Jun 2005
Posts: 27
Location: Russia, Tomsk

PostPosted: Wed Sep 21, 2005 2:17 pm    Post subject: Reply with quote

Спасибо, всё заработало :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Russian All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum