Jump to content

Samba Server w/Winbind - Changed AD Username, Now No Home Area


Recommended Posts

Posted

Hi all - not sure where I'm going wrong but got myself into this pickle.

 

Changed a student's username, now they don't get their home area. Home areas mapped to \\myserver1\homes and script steers them to their folder by year, then creates the home dir if it's not there.

 

# chown -R newusername . in the folder itself (if I've made it, it won't make its own) shows the permissions chown-ed to the OLD USERNAME.

 

Doing the following does the following:

 

# wbinfo -i newusername --> oldusername:*:48937:11617::/home/11617/oldusername:/bin/bash

 

# wbinfo -i oldusername --> failed to call wbcGetpwnam: WBC_ERR_DOMAIN_NOT_FOUND Could not get info for user oldusername

 

Logs on Windows machine gripes of incorrect password, despite being logged on.

 

Cached samba credentials or something somewhere? Samba user not syncing up or something? I'm out of ideas a bit. :/

 

Thanks for absolutely any help.

Posted

Yeah there is a cache, assuming you are using the tdb storage backend. I've never done it myself though but people talk of removing the tdb files completely to let winbind rebuild all the info again. - all I can say is backup stuff before unless you want to be rebuilding this machine after if it doesn't work!!

 

https://lists.samba.org/archive/samba/2010-May/155521.html

 

Winbind stil uses the UID of the user to map their 'identitiy' I suspect the cached one still has the old username against that ID.

  • Thanks 1
Posted

Thanks much Jamo! So, all I got that looks winbind-ey in /var/lib/samba is winbindd_idmap.tdb - do you think it'd be wise to mv that to a .bak, then restart samba? This is *live* (everyone's home areas) and I appreciate you've never done it either!

 

Cheers much.

  • 5 weeks later...
Posted

Just to conclude I bunged some stuff in a shell script, seems to work for me and thanks hugely everyone for the pointers! :)

 

service winbind stop;service smbd stop; net cache flush;rm -r /var/cache/samba/*;service winbind start;service smbd start;echo "All done"
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...