Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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"
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.