Manny
|
journeyman
|
|
|
|
Рег.: 10.11.2005
|
Сообщений: 74
|
Из: ГЗ, сектор Б
|
Рейтинг: 21
|
|
как настроить smb.conf и запустить демоны smbd и nmbd?
04.12.2005 03:26
|
|
|
Установил самбу. По крайней мере при запуске make и make install что-то компилировалось. Но я не смог настроить smb.conf. При запуске testparm появляется такое:
code:
[root@localhost samba]# testparm Load smb config files from /etc/samba/smb.conf Loaded services file OK. Server role: ROLE_STANDALONE Press enter to see a dump of your service definitions
# Global parameters [global] #client codepage = 866 workgroup = HACKERS netbios name = PROFESSIONAL #interfaces = 10.1.16.85/22 security = share log file = /var/log/smbd.%m max log size = 50 read bmpx = yes announce as = NT workstation load printers = no #character set = KOI8-R dns proxy = no wins server = 10.0.0.1 #hosts allow = 10.0.0.0/8 192.168.0.0./24 127.0.0.1 guest account = elf domain master = no preferred master = no max protocol = NT
[public] comment = Public path = /usr/home/samba/ guest ok = yes
и вопрос номер 2: Как запустить демоны? В мануале под словом запустить скрипт имелось ввиду создать файл startsmb c содержимым code:
#!/bin/sh /usr/local/samba/bin/smbd -D /usr/local/samba/bin/nmbd -D
?
Редактировал Manny (04.12.2005 04:03)
|
|
Vilfred_Sagen
|
спать хочу
|
|
|
|
Рег.: 29.10.2004
|
Сообщений: 22313
|
Из: moscow
|
Рейтинг: 7124
|
|
Re: как настроить smb.conf и запустить демоны smbd и nmbd?
[re: Manny]
04.12.2005 03:29
|
|
|
cat /etc/rc.d/rc.local
пиши строчку запуска в конец файлика и оно каждый раз по старту запускает нужную прогу
|
|
|
Re: как настроить smb.conf и запустить демоны smbd и nmbd?
[re: Vilfred_Sagen]
04.12.2005 03:41
|
|
|
Ссори, но можно поподробнее, я не слова не понял, что записывать в /etc/rc.d/rc.local ?
|
|
Vilfred_Sagen
|
спать хочу
|
|
|
|
Рег.: 29.10.2004
|
Сообщений: 22313
|
Из: moscow
|
Рейтинг: 7124
|
|
Re: как настроить smb.conf и запустить демоны smbd и nmbd?
[re: Anonymous]
04.12.2005 04:18
|
|
|
вставь строчки
/usr/local/samba/bin/smbd -D /usr/local/samba/bin/nmbd -D
в конец файла
/etc/rc.d/rc.local
|
|
Manny
|
journeyman
|
|
|
|
Рег.: 10.11.2005
|
Сообщений: 74
|
Из: ГЗ, сектор Б
|
Рейтинг: 21
|
|
Re: как настроить smb.conf и запустить демоны smbd и nmbd?
[re: Vilfred_Sagen]
04.12.2005 17:06
|
|
|
Кажется обнаружил я лажу в установке. В мануале написано так: code: The Samba Web Administration Tool (SWAT) runs as a daemon under inetd or xinetd and provides a forms-based editor in your web browser for creating and modifying Samba's configuration file. For SWAT to work, entries must be added for it in the /etc/services and /etc/inetd.conf (or /etc/xinetd.d/swat) configuration files. To add the entries, follow these two steps:
Check your /etc/services file, and if it does not contain the following line, add it to the end of the file:
swat 901/tcp Now for inetd or xinetd. These are "Internet super daemons" that handle starting daemons on demand, instead of letting them sit around in memory consuming system resources. Most systems use inetd, but xinetd is also used in some versions of Unix, notably the Red Hat Linux (Versions 7 and newer) that we use in our examples. You can use the ps command to see which of the two your system is running.
For inetd, add a line to the /etc/inetd.conf file. (Check your inetd.conf manual page to see the exact format of the inetd.conf file if it differs from the following example.) Don't forget to change the path to the SWAT binary if you installed it in a different location from the default /usr/local/samba:
swat stream tcp nowait root /usr/local/samba/bin/swat swat Then force inetd to reread its configuration file by sending it a SIGHUP (hangup) signal:
# /bin/kill -HUP -a inetd Notice that we are using a version of the kill command that supports the -a option, so as to allow us to specify the process by name. On FreeBSD and Linux, you can use the killall command[2] as follows:
# killall -HUP inetd If you are not running Linux or FreeBSD and your version of kill doesn't have the -a option, you will need to use the ps command to find the process ID and then supply that to kill:
# ps ax | grep inetd 780 ? S 0:00 inetd 1981 pts/4 S 0:00 grep inetd # kill -HUP 780 If your system is using xinet, add a file named swat in your /etc/xinetd.d directory, containing the following:
# description: swat is the Samba Web Administration Tool, which # allows an administrator to configure Samba using a web # browser interface, with the URL http://localhost:901 service swat. { socket_type = stream wait = no protocol = tcp only_from = localhost user = root log_on_failure += USERID server = /usr/local/samba/bin/swat port = 901 disable = no } Then xinetd needs to be sent a signal to make it reread its configuration files:
# /bin/kill -HUP -a xinetd
Во-первых, у меня нет файла /etc/inetd.conf Во-вторых, файла swat в директории /etc/xinetd.d не было. Я создал его и вставил указанное содержимое. В-третьих, когда я посылаю сигнал
code: # /bin/kill -HUP -a xinetd
выводится сообщение, о том что xinetd не обнаружен.
Как быть? (И вообще, во всему диску я искал файл xinetd.conf, такого вообще не существует). У меня Mandrake2006, устанавливаю самбу 2.2.8
Редактировал Manny (04.12.2005 23:04)
|
|
Manny
|
journeyman
|
|
|
|
Рег.: 10.11.2005
|
Сообщений: 74
|
Из: ГЗ, сектор Б
|
Рейтинг: 21
|
|
Re: как настроить smb.conf и запустить демоны smbd и nmbd?
[re: Manny]
04.12.2005 23:05
|
|
|
|
Salo
|
old rabbit
|
|
|
|
Рег.: 16.11.2003
|
Сообщений: 1749
|
Из: Крылатское
|
Рейтинг: 22
|
|
Re: как настроить smb.conf и запустить демоны smbd и nmbd?
[re: Manny]
04.12.2005 23:39
|
|
|
может у тебя просто не установлены inetd / xinetd ?
|
but to learn IS-IS you have to know the secret handshake and be a *%##%ing 33rd level mason -C.Whaley |
|
Manny
|
journeyman
|
|
|
|
Рег.: 10.11.2005
|
Сообщений: 74
|
Из: ГЗ, сектор Б
|
Рейтинг: 21
|
|
Re: как настроить smb.conf и запустить демоны smbd и nmbd?
[re: Manny]
05.12.2005 16:46
|
|
|
У меня Mandriva2006, они вроде должны быть установлены. А как их можно переустановить?
|
|
penartur2
|
|
|
|
|
Рег.: 16.06.2005
|
Сообщений: 54495
|
|
Рейтинг: 429
|
|
Re: как настроить smb.conf и запустить демоны smbd и nmbd?
[re: Manny]
05.12.2005 17:47
|
|
|
А что, если мандрива 2006 - то пакеты на стадии установки не выбираются?
|
Я ушел на новый форум. Там правовое государство. А еще можно удобно листать аплоад |
|
Rainman_V
|
Libra
|
|
|
|
Рег.: 07.06.2005
|
Сообщений: 2565
|
Из: Moscow
|
Рейтинг: 525
|
|
Re: как настроить smb.conf и запустить демоны smbd и nmbd?
[re: Manny]
05.12.2005 19:16
|
|
|
попробуй так -
code:
chkconfig --list |grep xinetd
|
|
|