Fedora linux forum

Форум русской поддержки ОС Fedora linux

 

#1 2009-09-23 21:01:47

FRY
New member
Зарегистрирован: 2009-09-23
Сообщений: 8

Авторизация

Здравствуйте! Такая проблема, сервер 2003, linux fedora. Захожу на сервер через самбу. Там просто сетевой диск есть «обмен» вот он через самбу виден всё нормально, захожу на него, он требует авторизации. Всё ок я прохожу. И потом допустим стоит мне закрыть этот сетевой диск или перезагрузить комп, я ещё раз хочу открыть этот сетевой диск и он запрашивает снова авторизацию. Как сделать что бы он не спрашивал каждый раз авторизацию при открытии этого сетевого диска. Лазил по форуму.. надо в самбе изменить настройки где глобальные или я не туда лезу? Просто срочно нужно!

Неактивен

 

#2 2009-09-24 05:53:11

Seven
Member
Откуда: Магнитогорск
Зарегистрирован: 2009-07-31
Сообщений: 43

Re: Авторизация

Телепаты в отпуске.
smb.conf в студию.
на вскидку могу сказать, если есть параметр deadtime = какое_то_значение, закоментируй его вообще или прировняй к нулю

Отредактированно Seven (2009-09-24 05:54:39)

Неактивен

 

#3 2009-09-24 09:08:19

FRY
New member
Зарегистрирован: 2009-09-23
Сообщений: 8

Re: Авторизация

Посылаю код своего smd.config я настроики делал графически, а не ручками, поэтому не видно изменений. или я просто туплю smile

Код:

# 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 (perhaps too
# many!) most of which are not shown in this example
#
# For a step to step guide on installing, configuring and using samba,
# read the Samba-HOWTO-Collection. This may be obtained from:
# http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
#
# Many working examples of smb.conf files can be found in the
# Samba-Guide which is generated daily and can be downloaded from:
# http://www.samba.org/samba/docs/Samba-Guide.pdf
#
# 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 commentry 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.
#
#---------------
# SELINUX NOTES:
#
# If you want to use the useradd/groupadd family of binaries please run:
# setsebool -P samba_domain_controller on
#
# If you want to share home directories via samba please run:
# setsebool -P samba_enable_home_dirs on
#
# If you create a new directory you want to share you should mark it as
# "samba-share_t" so that selinux will let you write into it.
# Make sure not to do that on system directories as they may already have
# been marked with othe SELinux labels.
#
# Use ls -ldZ /path to see which context a directory has
#
# Set labels only on directories you created!
# To set a label use the following: chcon -t samba_share_t /path
#
# If you need to share a system created directory you can use one of the
# following (read-only/read-write):
# setsebool -P samba_export_all_ro on
# or
# setsebool -P samba_export_all_rw on
#
# If you want to run scripts (preexec/root prexec/print command/...) please
# put them into the /var/lib/samba/scripts directory so that smbd will be
# allowed to run them.
# Make sure you COPY them and not MOVE them so that the right SELinux context
# is applied, to check all is ok use restorecon -R -v /var/lib/samba/scripts
#
#--------------
#
#======================= Global Settings =====================================
[global]
# ----------------------- Netwrok Related Options -------------------------
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostname
#
# Interfaces lets you configure Samba to use multiple interfaces
# If you have multiple network interfaces then you can list the ones
# you want to listen on (never omit localhost)
#
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
# specifiy it as a per share option as well
#
workgroup = MYGROUP
server string = Samba Server Version %v
; netbios name = MYSERVER
; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
; hosts allow = 127. 192.168.12. 192.168.13.
# --------------------------- Logging Options -----------------------------
#
# Log File let you specify where to put logs and how to split them up.
#
# Max Log Size let you specify the max size log files should reach
# logs split per machine
log file = /var/log/samba/log.%m
# max 50KB per log file, then rotate
max log size = 50
# ----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
security = user
passdb backend = tdbsam
# ----------------------- Domain Members Options ------------------------
#
# Security must be set to domain or ads
#
# Use the realm option only with security = ads
# Specifies the Active Directory realm the host is part of
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
#
# Use password server option only with security = server or if you can't
# use the DNS to locate Domain Controllers
# The argument list may include:
# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
# password server = *
; security = domain
; passdb backend = tdbsam
; realm = MY_REALM
; password server = <NT-Server-Name>
# ----------------------- Domain Controller Options ------------------------
#
# Security must be set to user for domain controllers
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
#
# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
#
# Domain Logons let Samba be a domain logon server for Windows workstations.
#
# Logon Scrpit let yuou specify a script to be run at login time on the client
# You need to provide it in a share called NETLOGON
#
# Logon Path let you specify where user profiles are stored (UNC path)
#
# Various scripts can be used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
#
; security = user
; passdb backend = tdbsam
; domain master = yes
; domain logons = yes
# the login script name depends on the machine name
; logon script = %m.bat
# the login script name depends on the unix user used
; logon script = %u.bat
; logon path = \\%L\Profiles\%u
# disables profiles support by specifing an empty path
; logon path =
; add user script = /usr/sbin/useradd "%u" -n -g users
; add group script = /usr/sbin/groupadd "%g"
; add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
; delete user script = /usr/sbin/userdel "%u"
; delete user from group script = /usr/sbin/userdel "%u" "%g"
; delete group script = /usr/sbin/groupdel "%g"
# ----------------------- Browser Control Options ----------------------------
#
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
#
# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
#
# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
; local master = no
; os level = 33
; preferred master = yes
#----------------------------- Name Resolution -------------------------------
# Windows Internet Name Serving Support Section:
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
#
# — WINS Support: Tells the NMBD component of Samba to enable it's WINS Server
#
# — WINS Server: Tells the NMBD components of Samba to be a WINS Client
#
# — WINS Proxy: Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one WINS Server on the network. The default is NO.
#
# DNS Proxy — tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups.
; wins support = yes
; wins server = w.x.y.z
; wins proxy = yes
; dns proxy = yes
# --------------------------- Printing Options -----------------------------
#
# Load Printers let you load automatically the list of printers rather
# than setting them up individually
#
# Cups Options let you pass the cups libs custom options, setting it to raw
# for example will let you use drivers on your Windows clients
#
# Printcap Name let you specify an alternative printcap file
#
# You can choose a non default printing system using the Printing option
load printers = yes
cups options = raw
; printcap name = /etc/printcap
#obtain list of printers automatically on SystemV
; printcap name = lpstat
; printing = cups
# --------------------------- Filesystem Options ---------------------------
#
# The following options can be uncommented if the filesystem supports
# Extended Attributes and they are enabled (usually by the mount option
# user_xattr). Thess options will let the admin store the DOS attributes
# in an EA and make samba not mess with the permission bits.
#
# Note: these options can also be set just per share, setting them in global
# makes them the default for all shares
; map archive = no
; map hidden = no
; map read only = no
; map system = no
; store dos attributes = yes
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes
# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no
# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
; [Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes
# A publicly accessible directory, but read only, except for people in
# the "staff" group
; [public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = +staff

Неактивен

 

#4 2009-09-24 09:16:46

Seven
Member
Откуда: Магнитогорск
Зарегистрирован: 2009-07-31
Сообщений: 43

Re: Авторизация

так, я возможно не понял.... (прочитал еще не проснувшись)
а кто к ому подключается? linux к винде или наоборот?
если винда к линуксу. то там есть возможность запомнить пароль.
а винда к линуксу, то тут smb.conf не причем, и если записать в /etc/fstab строчку для автомонтирования, типа

Код:

//IP_TO_SERVER/SHARE_NAME /mnt/data smbfs username=USERNAME,password=PASSWORD, 0 0

Отредактированно Seven (2009-09-24 09:20:45)

Неактивен

 

#5 2009-09-24 12:02:46

FRY
New member
Зарегистрирован: 2009-09-23
Сообщений: 8

Re: Авторизация

Seven, блин может я туплю но тоже самое вот код

Код:

#
# /etc/fstab
# Created by anaconda on Sat Sep 19 05:04:02 2009
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or vol_id(8) for more info
#
UUID=144de8ed-03b7-4eda-a4d9-4f2ab936f5fc /boot ext3 defaults 1 2
/dev/mapper/vg_ekoline-lv_root / ext4 defaults 1 1
/dev/mapper/vg_ekoline-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts defaults 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
//10.1.1.1/work /mnt/data smbfs username=Администратор,password=123, 0 0

Неактивен

 

#6 2009-09-24 12:25:59

Seven
Member
Откуда: Магнитогорск
Зарегистрирован: 2009-07-31
Сообщений: 43

Re: Авторизация

блин, не заметил после пароля не нужна запятая (хотя по логике не помешает)
и что, автоматом не цепляется, в логах что пишет?
когда монтируешь вручную монтируется?
и еще, вот смущает меня имя юзера по русски, все таки могут кодировки не совпадать

Неактивен

 

#7 2009-09-24 13:36:35

FRY
New member
Зарегистрирован: 2009-09-23
Сообщений: 8

Re: Авторизация

Я новичок просто. smile сильно не обижайтесь. Я изминил юзера и сделал в английской варианте. убрал запятую и всё равно тоже самое. Я вот думаю может через KWaletManager тобишь менеджер паролей? smile только он у меня не запускается автоматически. когда в ручнцю мантирую да! всё ок. только при перезагрузке компа снова надо вводить имя пользователя и пароль для того что бы открыть это сетевое подключение... надоело.. начальство ругает

Неактивен

 

#8 2009-09-24 14:06:58

Seven
Member
Откуда: Магнитогорск
Зарегистрирован: 2009-07-31
Сообщений: 43

Re: Авторизация

блин, ну на то пароли и придуманы что бы их вводить.
вот только я не понял фразу "и всё равно тоже самое" что именно.
вот ты в терминале/консоле вводишь mount -t  smbfs //10.1.1.1/work /mnt/data username=Администратор,password=123
как ругается клиент??? что говорит? нет доступа или же коннектится??

Неактивен

 

#9 2009-09-24 17:11:18

Stuff
Member
Зарегистрирован: 2008-01-21
Сообщений: 86

Re: Авторизация

Ну вообще-то пароли кешируются на время одного сеанса (грубо говоря до перезагрузки). В виндах аналогично. Если не хотите вводить пароли — не ставьте их, всё просто.

Неактивен

 

#10 2009-09-24 19:55:44

FRY
New member
Зарегистрирован: 2009-09-23
Сообщений: 8

Re: Авторизация

Stuff d винде можно галочку поставить типа запомнить пароль, или при подключении сетевого диска есть надпись.. подключиться от другого имени и там все просто. аа тут что то не так..
Seven, ваше предложение попробую завтра, комп не подругой. А так просто я дома допустим сделал сеть.. домена нет правда а есть рабочая группа. (Делал тоже пользователя admin и пароль 123) потом расшарил папку рабочий стол.. в лине захожу сетевые подключения, самба..он сам определяет рабочую групу.. потом комп и видет эту папку. на неё захожу с линукса и он пароль не спрашивает даже. просто в опен сусе есть при окошке авторизации на запрос сетевого диска галочка типа запомнить пароль smile

Неактивен

 

#11 2009-09-25 05:40:00

Seven
Member
Откуда: Магнитогорск
Зарегистрирован: 2009-07-31
Сообщений: 43

Re: Авторизация

FRY написал:

на неё захожу с линукса и он пароль не спрашивает даже. просто в опен сусе есть при окошке авторизации на запрос сетевого диска галочка типа запомнить пароль smile

ну я тут наверно не помошник... хоть у меня на серваке и установлены openSUSE 11.1 и Fedora Core 11, но все они работают в консольном режиме (id:3:initdefault:).... так что вот с этими "окошками" я даже не знаком.

Неактивен

 

#12 2009-09-25 17:54:30

FRY
New member
Зарегистрирован: 2009-09-23
Сообщений: 8

Re: Авторизация

Seven, на вашу строчку

mount -t  smbfs //10.1.1.1/work /mnt/data username=Администратор,password=123

пишит следующее

Код:

Usage: mount -V : print version
mount -h : print this help
mount : list mounted filesystems
mount -l : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
mount -a [-t|-O] ... : mount all stuff from /etc/fstab
mount device : mount device at the known place
mount directory : mount known device here
mount -t type dev dir : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
mount --bind olddir newdir
or move a subtree:
mount --move olddir newdir
One can change the type of mount containing the directory dir:
mount --make-shared dir
mount --make-slave dir
mount --make-private dir
mount --make-unbindable dir
One can change the type of all the mounts in a mount subtree
containing the directory dir:
mount --make-rshared dir
mount --make-rslave dir
mount --make-rprivate dir
mount --make-runbindable dir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using -L label or by uuid, using -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say man 8 mount .

Что это означает Х.З.

Неактивен

 

#13 2009-09-25 18:24:12

Seven
Member
Откуда: Магнитогорск
Зарегистрирован: 2009-07-31
Сообщений: 43

Re: Авторизация

Это означает что твоему линуксу файловая система smbfs не известна... возможно в место нее надо попробовать cifs.
так как я сам иксами редко пользуюсь, а уж если монтирую диск то спомощью mc, я чуть в тупике... но выход всегда можно найти.
Вот смотри, ты в начале писал что на нужную шару заходишь, но при этом авторизируешься, а где? если в консоле то как монтируешь??? ну если в иксах то вопросов нет, точнее есть просьба сделать, после того как смонтируешь, в консоле команду mount без параметров. там будет указана файловая система... вобщем копируй сюда вывод команды

Отредактированно Seven (2009-09-25 18:27:15)

Неактивен

 

#14 2009-09-25 18:40:19

FRY
New member
Зарегистрирован: 2009-09-23
Сообщений: 8

Re: Авторизация

Всё делаю в иксах. Вот код что написал после монтирования

Код:

/dev/mapper/vg_ekoline-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
gvfs-fuse-daemon on /home/aleksandrs/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=aleksandrs)

Неактивен

 

#15 2009-09-28 21:11:50

Seven
Member
Откуда: Магнитогорск
Зарегистрирован: 2009-07-31
Сообщений: 43

Re: Авторизация

в место smbfs используй cifs

Неактивен

 

#16 2009-09-28 22:01:28

FRY
New member
Зарегистрирован: 2009-09-23
Сообщений: 8

Re: Авторизация

Seven, проблема решина! Просто как два пальца... Догодался сам... методом тыка! smile Мои действия...(всё через иксы) пуск параметры системы...вкладка "главное" общий доступ к файлам...вводим туда пароль и пользовотеля! Любым языком! рус, англ. всё определяется! всё видно и весь комп и шары определяет сам! Кому нужен доступ, в смысле к какому компу.. делаем там тогоже пользовюка с этимже паролем и всё вуаля!big_smile

Неактивен