JRA Posted October 14, 2016 Posted October 14, 2016 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.
Jamo Posted October 16, 2016 Posted October 16, 2016 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. 1
JRA Posted October 17, 2016 Author Posted October 17, 2016 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.
Jamo Posted October 17, 2016 Posted October 17, 2016 Samba Winbind User Resolution - Server Fault Seems to be what you are looking for, might be worth trying the net cache flush first. Guessing you have no test system to try this on first.... as mentioned ive never needed to run it so far! 1
JRA Posted October 18, 2016 Author Posted October 18, 2016 Yeah that looks bang on! I'll try that (at half-term when nobody's here.) Thanks!!
JRA Posted November 17, 2016 Author Posted November 17, 2016 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" 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now