LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-18-2007, 05:58 AM   #1
mik83only
LQ Newbie
 
Registered: Jun 2006
Location: Tambov, Russia
Distribution: FreeBSD
Posts: 8

Rep: Reputation: 0
smbusers problem


Can you please help me with username option , I don't quite understand how it works.
I want to use one unix username for several samba names.

I tried to do something like this in my config files
1) smb.conf:
username map = /usr/local/etc/smbusers
2)smbusers:
ituser = scorpion sabo1 sabo2

I have a user "ituser" in Unix and I want to add scorpion, sabo1, sabo2 to samba, but when i try
smbpasswd -a sabo1
I get
"Failed to initialise SAM_ACCOUNT for user scorpion. Does this user exist in the UNIX password database ?
Failed to modify password entry for user scorpion"

What am I doing wrong?
 
Old 07-18-2007, 06:22 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I think that file produces an alias for a user, so use smbpasswd ituser.

From the name, ituser looks like it should be a group and not a user, so create an "ituser" group and make scorpion, sabo1, & sabo2 members of the group.
 
Old 07-18-2007, 06:58 AM   #3
mik83only
LQ Newbie
 
Registered: Jun 2006
Location: Tambov, Russia
Distribution: FreeBSD
Posts: 8

Original Poster
Rep: Reputation: 0
smbpasswd -a ituser will add "ituser" to samba, I don't need this. I want to map several windows users (scorpion, sabo1, sabo2) to one unix user(ituser).
How do I do this ?
May be my explanation is not very clear.
I'll try to explain what I want.
The usual way is to create a unix user and then add the user to samba with smbpasswd. But I have a lot of windows users that use samba server, so I don't want to create a unix login name for everyone. I want to use one unix user for all the samba users.

Last edited by mik83only; 07-18-2007 at 09:05 AM.
 
Old 07-18-2007, 05:43 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I hadn't used the smbusers file before. I tried it out. I created a user on another laptop jimbo@delllap and added an alias in my regular laptop "jschiwal = jimbo" (hpamd64). I still needed to add jimbo as a user on hpamd64. After that, if I connected to hpamd64 as the jimbo user, I would get the files for my regular user "jschiwal". So if your goal is to not have to create user accounts for each windows user and you use smbpasswd, I don't think this is the way to use it. Also your error message indicates that the use of a tdbsam database was expected.

Either make the share available to the guest user, and map bad users to the guest account, or use "force user" & "force guest", or use a different password backend. It sounds like this file works better if you use tdbsam instead of smbpasswd.

How many users are you talking about. Does this server operate in STANDALONE mode, or is it one of many domain controllers. If it is a STANDALONE server (which could be a lone PDC) then look at using tdbsam. If you have more than 250 users, look at using a ldapsam backend instead if you employ more than one samba server. According to the Samba 3 documentation, this recommendation is based not so much on the number of users, but on the difficulty of replicating the database to other servers.

quote from Samba3-HOWTO:
Quote:
10.4.3 tdbsam
Samba can store user and machine account data in a “TDB” (trivial database).
Using this backend does not require any additional configuration. This backend
is recommended for new installations that do not require LDAP.
As a general guide, the Samba Team does not recommend using the tdbsam
backend for sites that have 250 or more users. Additionally, tdbsam is
not capable of scaling for use in sites that require PDB/BDC implementations
that require replication of the account database. Clearly, for reason of
scalability, the use of ldapsam should be encouraged.
The recommendation of a 250-user limit is purely based on the notion that
this would generally involve a site that has routed networks, possibly spread
across more than one physical location. The Samba Team has not at this
time established the performance-based scalability limits of the tdbsam architecture.
There are sites that have thousands of users and yet require only one server.
One site recently reported having 4,500 user accounts on one UNIX system
and reported excellent performance with the tdbsam passdb backend.

The limitation of where the tdbsam passdb backend can be used is not one
pertaining to a limitation in the TDB storage system, it is based only on
the need for a reliable distribution mechanism for the SambaSAMAccount
backend.
Also look in the Samba3-ByExample documentation. They have examples for various sized networks. Seeing how each member is configured and how they all fit together might help.

Last edited by jschiwal; 07-18-2007 at 05:48 PM.
 
Old 07-19-2007, 01:08 AM   #5
mik83only
LQ Newbie
 
Registered: Jun 2006
Location: Tambov, Russia
Distribution: FreeBSD
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks you for help. It looks like smbusers won't help me.
Guest account is the way I use it now, but it's
not very convenient, cause I can't see the owner of the files.
I don't have so many users, about 30.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 07:45 PM
smbusers and users c0c0deuz Linux - Networking 2 11-12-2002 10:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration