samba server

Dear All,

i have configured a samba server where i have configured it for /mnt dir to be exported/shared.
when i verify this share, i see mnt dir but i want the content inside the mnt to be visible or chroot into mnt directly.

thanks,

So, I do not know what you have mounted in /mnt but the problem is most likely your Samba version. Check your samba version and if it is at or around version “3.4.3-3.3.1” I would downgrade it back to “3.4.2-1.1.3.1”. There is a bug in the newer versions of Samba which does not work properly. The change was made for security reasons, but the patient dies. I suggest you go to Software Management and search on Samba (include Description in the search so you will get the cifs file). On the first program found, go to the versions tab. Change the version to 3.4.2-2.3.1 from repository openSUSE-Oss, picking the 32 or 64 bit to match your openSUSE version. Do this for all matches and then press accept. If the “3.4.2-1.1.3.1” version of Samba is not present, then leave the file unchanged. I normally go back in and do the search again, but this time for each file you down graded, I put a protected symbol on it so it will not be upgraded in the future. I have 16 Samba files total that had to be downgraded, but I have both 64 and 32 bit versions loaded.

So, just what is in your /mnt folder that you want to share? Mine is blank and when I plug in a new drive, it goes to /media not /mnt.

Thank You,

but i do not want the user to change dir to /mnt manually, instead i want the user to automatically lie/drop into /mnt itself.

Regards,
Ghulam Yaseen

On Wed April 28 2010 12:46 am, ghulamyaseen wrote:

>
> but i do not want the user to change dir to /mnt manually, instead i
> want the user to automatically lie/drop into /mnt itself.
>
>
> Regards,
> Ghulam Yaseen
>
>
Ghulam Yaseen;

Can you post the contents of /etc/samba/smb.conf ? You may use substitute
values to conceal any confidential information such as private IPs.

What kind of media do you have mounted at /mnt ?

You might also find it helpful to read these two documents:
http://opensuse.swerdna.org/suselanprimer.html
http://opensuse.swerdna.org/susesambaserver.html

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

/mnt is an example only, why should i click on mnt folder when access share from windows. why not i directly get access to /mnt folder. there should be fix to it!
Below is the important config options that i am using foor samba,

[global]

----------------------- Network 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/%m.log
# max 50KB per log file, then rotate
; max log size = 50

----------------------- Standalone Server Options ------------------------

Security 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

; 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”

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
    disable spoolss = yes

[backup]
comment = Backup User
path = /xxx.xx/backup
valid users = backup-db
writable = no

Just for clarity, I took out all the comments from that imported smb.conf and here are the real contents:

[global]
workgroup = MYGROUP
server string = Samba Server Version %v
disable spoolss = Yes
cups options = raw

[backup]
comment = Backup User
path = /xxx.xx/backup
valid users = backup-db
writable = no

Is this the problem: you can see the resource “backup” on the LAN but when you click to enter it you are refused entry? Describe what actually happens, describe the problem?

On Wed April 28 2010 07:56 am, swerdna wrote:

>
> Just for clarity, I took out all the comments from that imported
> smb.conf and here are the real contents:
>> [global]
>> workgroup = MYGROUP
>> server string = Samba Server Version %v
>> disable spoolss = Yes
>> cups options = raw
>>
>> [backup]
>> comment = Backup User
>> path = /xxx.xx/backup
>> valid users = backup-db
>> writable = no
>
> Is this the problem: you can see the resource “backup” on the LAN but
> when you click to enter it you are refused entry? Describe what actually
> happens, describe the problem?
>
Ghulam Yaseen;

In addition to the questions of Swerdna, can you be a bit more clear
what “xxx.xx” points to? Is this the name of a directory contained in your
root directory? Is the file system there local?

(I guess your use of the example /mnt, makes me think that this may be a file
system mounted from a different machine.)

The valid users parameter you have set, gives access to the share only to the
user that validates on Samba as “backup-db”. The user gyassen, for example
will be denied access. You can check how users validate on Samba as
follows:

Add this parameter to the [Global] section of /etc/samba/smb.conf:


log level = 1 auth:3

Restart Samba and then authentication will be logged
in /var/log/samba/log.smbd


P. V.
“We’re all in this together, I’m pulling for you.” Red Green