[Samba] Newbie : bad uid in the smbpasswd file ?

Francois Lafont flafdivers at free.fr
Tue Dec 28 16:43:01 MST 2010

Le 28/12/2010 20:29, Gary Dale a écrit :

> Bonjour Francois. One question is why are you using smbpasswd instead of
> tdb for the backend?

As I said in the title of my post, I'm a newbie and I'm just learning
Samba and at the moment I'm just trying a few basic shares. I have seen
that "tdb backend" is better than "smbpasswd backend" but to begin I
thought It was clearer for me to use plain text file for the storage of
the users'accounts.

And I met this problem of uid that annoys me and I would like to understand.

> I suggest that you remove (purge) your samba implementation and
> reinstall it with the defaults. 

I have tried this:

# apt-get update
# apt-get purge samba
# apt-get install samba

But, with the smb.conf file that I have posted in my first message, I
have exactly the same problem:

# smbpasswd -a francois -D 10 | grep -i 'uid'
New SMB password:
Retype new SMB password:
getsmbfilepwent: returning passwd entry for user francois, uid 0
getsmbfilepwent: returning passwd entry for user francois, uid 0

# cat smbpasswd
francois:0: [snip]

# cat /etc/passwd | grep francois

I'd really like to understand the problem.

> Next use swat to configure things.

Is it not better to edit smb.conf with a simple editor?

> You need to consider the role the server plays, I highly recommend that
> you make it a domain controller unless you already have one. If you have
> a domain controller then join the server to the domain. If you don't
> have a domain controller, then use your samba server as domain controller.
> Once you have your server's role established, add and enable the
> accounts using swat.
> If this is a workstation that you are simply trying to share a folder
> from, then consider whether that is really a good idea. Sharing files
> exposes your machine unnecessarily. It is far better to set up a server
> with a shared folder.
> You can get all kinds of network storage devices quite cheaply that will
> do the job. Or you can use an old computer and set it up as domain
> controller/file server. You can even share printers, scanners, etc. from
> it.
> However, if you must use a workstation to share files, then use swat to
> configure it as a standalone or domain member server with whatever
> access rights you want. However, I strongly advise against using your
> account to provide guest access. Set up a real guest account that has no
> login rights (e.g. set the login shell to /bin/false).

Thanks for the pieces of advice. At the moment, I'm just learning with
my computer (Ubuntu 10.04) and client XP (Virtual machine with VirtualBox).

Francois Lafont

More information about the samba mailing list