|
From: Jamie C. <jca...@we...> - 2006-01-28 22:45:19
|
On Thu, 2006-01-26 at 04:16, Bill Arlofski wrote: > On Tuesday 24 January 2006 22:23, Jamie Cameron wrote: > > On Wed, 2006-01-25 at 10:06, William Arlofski wrote: > > > Jamie Cameron wrote: > > > > On Wed, 2006-01-25 at 09:21, William Arlofski wrote: > > > >>A client of mine just reported a STRANGE problem when trying to create > > > >>new users in WebMins "Users and Groups" Module. I have spent the last > > > >>hour troubleshooting and verifying this. What follows is a description > > > >>of what is happening to the system files (/etc/passwd and /etc/shadow) > > > >>as well as the Samba user file (smbpasswd) when a new users is added > > > >> and later edited. > > > >> > > > >>They are currently using Webmin 1.250 > > > >> > > > >> > > > >>Create a new user with > > > >> > > > >>id: first_last > > > >> > > > >>User ID: choose text field and type 9999 > > > >>select "normal password" radio button and type in "password" (no > > > >> quotes) choose primary group > > > >> > > > >> > > > >>Save > > > >> > > > >>/etc/passwd now contains: > > > >> > > > >>first_last:x:9999:6000:Test User:/home//students/first_last:/bin/false > > > >> > > > >>(which is correct except for the TWO slashes between home and students) > > > >> > > > >>the /etc/shadow file looks like: > > > >> > > > >>first_last:$1$38139902$erEXj5Hm2wp4Dp4qUTzvO0:13172:::::: > > > >> > > > >>Which looks correct. > > > >> > > > >> > > > >>BUT, Samba's smbpasswd file contains: > > > >> > > > >>first_last:9999:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXX > > > >>XXXXXXXXXX:[U ]:LCT-43D6A303: > > > >> > > > >>it is not wrapped in the smbpasswd file. Notice there is no password so > > > >>he can not log in to the Samba Domain controller. > > > >> > > > >> > > > >>But wait... Maybe I didn't actually select the "Normal Password" radio > > > >>button when I entered him - even though I did. (This is where it gets > > > >>really strange) > > > >> > > > >>Go back and edit the user: > > > >> > > > >>switch the "Pre encrypted passwrod" radio button to "Normal Password" > > > >>and retyp his password. > > > >> > > > >>Click SAVE... > > > >> > > > >> > > > >>NOW... > > > >> > > > >>/etc/password contains: > > > >> > > > >>first_lastfirst_last:x:9999:6000:Test > > > >>User:/home//students/first_lastfirst_last:/bin/false > > > >> > > > >>(not wrapped of course) > > > >> > > > >>/etc/shadow contains: > > > >> > > > >>first_lastfirst_last:$1$38140733$C29l/0szvz337yXUOwMB3/:13172:::::: > > > >> > > > >>AND SMBPASSWD CONTAINS: > > > >>first_lastfirst_last:9999:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXX > > > >>XXXXXXXXXXXXXXXXXXXX:[U ]:LCT-43D6A641: > > > >> > > > >> > > > >>HHHM! So I go re-edit the user and notice that his name appears twice > > > >>in the list of users and in the id field... so I strip off the 2nd > > > >>iteration of his name, set his password again and save: > > > >> > > > >>NOW, /etc/passwd contains: > > > >> > > > >>first_lastfirst_last first_last:x:9999:6000:Test > > > >>User:/home//students/first_lastfirst_last first_last:/bin/false > > > >> > > > >> > > > >>And so on... As it is, Webmin's "Users and Groups" module is no longer > > > >>funtional at my client's site. If there a fix, or if can I provide more > > > >>information to help solve thess issues please let me know. > > > > > > > > That is extremely strange, > > > > > > Agreed... > > > > > > > and certainly doesn't happen on my system! > > > > What operating system are you running Webmin on there? > > > > > > > > - Jamie > > > > > > The system is an older RedHat 6.2 system that has had Webmin as its > > > interface for my clients since about December 2000. Never saw such a > > > funky set of symptoms. > > > > > > As it stands, I can add a user by manually issuing the three commands: > > > > > > # useradd (with all appropriate parameters) > > > # passwd to set the UNIX password > > > # smbpasswd and re-typing their samba password twice. > > > > Of those, Webmin actually only uses smbpasswd .. for the user creation, > > it modifies /etc/passwd directly. > > Hmmm, perhaps something has gone awry with the smbpasswd file that webmin is > calling... I'll check the users and groups module's config as well as the > samba module's config to be 100% sure that it is not calling a > stray/old/leftover smbpasswd all of a sudden. > > But even so, I'd like to keep in mind another odd thing that I reported which > is that when I go to EDIT a current user the user's ID on the edit page has > their id automatically inserted twice into the text field. I'll double-check > this on a few users and report back on this, perhaps in a separate thread. > > > > So I know the base command line tools are fully functional. > > > > > > Is there something I can set within webmin to have that module log some > > > debugging information to help track this down? Obviously something is > > > wrong but it is eluding me. > > > > You might want to check out the Webmin Actions Log module, which records > > exactly what changes are made to what files, and what commands are run > > (assuming full logging is enabled). > > > Looks like FULL logging was/is enabled. I just checked and the only thing > that was not enabled was" Record all modified files before actions, for > rollbacks". I just checked that box, but it is probably not necessary. > > > The "Action Details" for that user creation test show that > useradmin/save_user.cgi was run and the it created the > directory /home/students/first_last with two forward slashes between home ans > students, and the data it put into /usr/local/samba/private/smbpasswd was all > XXXXs. I know the two slashes will not affect/break anything, but they were > never appearing before. It may be worth investigating the smbpasswd command... Webmin doesn't actually update smbpasswd directly, instead it runs smbpasswd with the username and password as parameters, which is then expected to update the file. - Jamie |