|
From: Bill A. <waa...@re...> - 2006-01-25 17:16:57
|
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 student= s) > > >> > > >>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:XXXXXXXXXXXXXXXXXXXX= XX > > >>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:XXXXXXXXXX= XX > > >>XXXXXXXXXXXXXXXXXXXX:[U ]:LCT-43D6A641: > > >> > > >> > > >>HHHM! So I go re-edit the user and notice that his name appears twi= ce > > >>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 mo= re > > >>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 i= s=20 calling... I'll check the users and groups module's config as well as the=20 samba module's config to be 100% sure that it is not calling a=20 stray/old/leftover smbpasswd all of a sudden. But even so, I'd like to keep in mind another odd thing that I reported whi= ch=20 is that when I go to EDIT a current user the user's ID on the edit page has= =20 their id automatically inserted twice into the text field. I'll double-chec= k=20 this on a few users and report back on this, perhaps in a separate thread.= =20 > > 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= =20 that was not enabled was" Record all modified files before actions, for=20 rollbacks". I just checked that box, but it is probably not necessary. The "Action Details" for that user creation test show that=20 useradmin/save_user.cgi was run and the it created the=20 directory /home/students/first_last with two forward slashes between home a= ns=20 students, and the data it put into /usr/local/samba/private/smbpasswd was a= ll=20 XXXXs. I know the two slashes will not affect/break anything, but they were= =20 never appearing before.=20 Here is a the complete text of that "Action Details" page: (please ignore the wrapping by my email client on this paste) =2D-[snip]--=20 Created directory /home//students/first_last =20 Executed command cp -R \/etc\/skel\/Psidata \/home\/\/students\/first_last\/Psidata=20 Executed command chown -R 9999:6000 "/home//students/first_last/Psidata"=20 Executed command cp \/etc\/skel\/\.bash_logout \/home\/\/students\/first_last\/\.bash_logo= ut=20 Executed command cp \/etc\/skel\/\.bash_profile=20 \/home\/\/students\/first_last\/\.bash_profile=20 =20 Executed command cp \/etc\/skel\/\.bashrc \/home\/\/students\/first_last\/\.bashrc=20 =20 Executed command ln -s Psidata \/home\/\/students\/first_last\/\.psi=20 =20 Executed command chown -h -R 9999:6000 "/home//students/first_last/.psi"=20 Executed command cp \/etc\/skel\/\.screenrc \/home\/\/students\/first_last\/\.screenrc=20 Executed command cp -R \/etc\/skel\/\.profile \/home\/\/students\/first_last\/\.profile=20 Executed command chown -R 9999:6000 "/home//students/first_last/.profile"=20 Changed file /etc/passwd 467a468 > first_last:x:9999:6000:Test User:/home//students/first_last:/bin/false Changed file /etc/shadow 471a472 > first_last:$1$38139902$erEXj5Hm2wp4Dp4qUTzvO0:13172:::::: Changed file /usr/local/samba/private/smbpasswd 436a437 >=20 first_last:9999:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXX= XXXXXX: [U ]:LCT-43D6A303: =2D-[snip]-- =20 > By the way, which theme do you have selected in Webmin? > > - Jamie MSC.Linux Theme Thanks again Jamie =2D - Bill Arlofski Reverse Polarity waa...@re... |