Hello All,

I am new to the forum and have a bit of a problem...

I am trying to change the windows generated UID numbers to specific UIDs when I log in to the linux machines.

I am having trouble changing the UIDs to specific numbers. I downloaded and installed SFU and changed the unix ids on the windows side but the ids aren't changing on the linux side when I log in. they are still the same windows generated UIDs. I attempted changing the winbind_idmap.tdb file which did let me change the UID on the local machine (which is fine) but when I log in as that user the UID will not resolve to the user name anymore (and i get weird errors).


I modified the winbindd_idmap.tdb file with no problems and got it to work when I did an

>"id username"

Command it would show the changed UID and GID.. The problem I am having now is that when I try to login as the modified user it cannot resolve a username to that UID. When I open a terminal it looks like this…

[I have no [EMAIL="name!@computer"]name!@computer[/EMAIL] directory]

Is there a file that maps UIDs to specific user names? I looked in the samba directory (where I found the winbindd_idmap.tdb file) and no other database files have username information in them.
Any ideas on that?

Any help would be great,

-Justin

Dani AI

Generated

Brief diagnosis and a safe path forward.

The prompt you see ("I have no name!@...") plus the behavior you describe from are classic signs that the system can authenticate the UID but cannot resolve the UID back to a username via NSS/PAM. Manually poking the local idmap TDB can change the mapping on that host, but the TDB is a local store and editing it directly is fragile — it often leaves winbind, NSS and PAM out of sync and will not produce consistent, domain-wide UIDs. (samba.org)

If Windows/SFU is being used to assign unix attributes (uidNumber/gidNumber) you should configure Samba/winbind to read those attributes (use the AD/rfc2307 idmap backends and enable the RFC2307 NSS info option) so IDs come from Active Directory instead of local TDB edits. Also ensure the uid/gid values in AD fall inside the idmap ranges you configure — otherwise winbind will ignore them. This is the supported, centralised approach to keep UIDs identical across Linux hosts. (samba.org)

Troubleshooting checklist (non-destructive):

  • Verify winbind is running and that NSS is configured to consult winbind for passwd/group lookups.
  • Ensure PAM uses pam_winbind for logins on domain members.
  • Use wbinfo to inspect SID↔UID mapping from the daemon and use the net idmap dump/restore facilities (stop winbind first) rather than editing TDB files by hand. These steps let you confirm where the breakdown is — name->UID, UID->name, or a mismatched idmap backend. (samba.org)

A note on local vs domain changes: is correct that vipw edits /etc/passwd for purely local accounts. For domain-managed users, change the source (AD id attributes or Samba idmap backend) instead; changing ranges or UIDs later will also change file ownership on disk, so plan ownership migration if you reassign IDs. (docs.redhat.com)

Summary: avoid manual edits of winbind TDB on multiple hosts, decide whether IDs should be managed locally or centrally, configure the appropriate idmap backend (AD/RFC2307 or a shared idmap), make sure NSS/PAM are wired to winbind, and use wbinfo/net idmap for safe inspection and changes.

Recommended Answers

All 4 Replies

Typically, the passwd keeps the UID's of users, if your using winbind however, it will probably be controlled by the domain controller, if you do a getent passwd do you see the users and their UID's?

And did you restart the winbind daemon after making the changes?

I tried getent passwd and found my username being attached to the UID I configured in the winbindd_idmap.tdb file. And it looks fine. But I still have the same problem. It will not resolve the username. I get errors saying that a username cannot be found for my uid when I log in using my username.

Are there any other files that would have my username/UID information?

By reseting the domain controller you mean just restart the windows box right? I will do that but I don't think that will help. I also run a local samba service restart everytime I make a change.

I'm having this same issue have you found any solution to the problem?

not sure if i understand completely, but if your looking to change the UID of the *nix user, you use vipw :) do not use vi on passwd!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.