Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No custom logos appearing in Usermin #710

Closed
brianforan opened this issue Apr 5, 2017 · 64 comments
Closed

No custom logos appearing in Usermin #710

brianforan opened this issue Apr 5, 2017 · 64 comments

Comments

@brianforan
Copy link

brianforan commented Apr 5, 2017

  • What is your server-side OS and its version?
    Ubuntu 16.04
  • What is your client-side OS, browser and its versions?
    OSX Sierra / Chrome 56
  • What are the steps to reproduce the issue
    Installed Authentic theme fresh on Webmin and Usermin and went to Usermin, not logos showing

I'm trying (like in #639) to get the custom logos working on Usermin. None of the logos are appearing in Usermin although the images are both kept in /etc/usermin/authentic-theme/images/ and /etc/usermin/authentic-theme/ - I put them in images as well because I noticed that in the code those directories were references.

/usr/share/usermin/authentic-theme/ is also populated.

I'm having difficulties determining why it isn't working because in the sub embed_logo() { ... } function it would appear that it would work regardless. We were trying to check where $root_directory was initialized to see if maybe that was the issue but couldn't find it so figured it's not on GitHub.

The page itself does not show anything with the divs that are supposed to be printed, they are just missing completely.

Thanks

@iliajie
Copy link
Collaborator

iliajie commented Apr 5, 2017

Did you try to reload the whole page, and not just the right frame?

Do you have proper permissions on the directories?

If I upload the logo in Webmin->Theme Configuration->Logos I can see it in both Webmin and Usermin.

At the same time, there is no option yet to have different logos for Webmin/Usermin

@brianforan
Copy link
Author

What do you mean by the right frame? I reloaded by refreshing the page/restarting Usermin so I'm pretty sure it was an adequate refresh. I also deleted the theme from Webmin and Usermin and reinstalled to make sure they were the same version because at one point we'd gotten a Perl error because I believe they were mismatched.

This is the permission/info on /etc/usermin/authentic-theme: d-wxr----t 3 root root 4096 Apr 5 16:19 authentic-theme - sorry, I am not very well versed in *nix command line but trying to pick it up as I go.

The logos were uploaded through Webmin/Webmin Configuration/Themes/Theme Logos in the past and are still visible there. The login page/bottom left logo works great in Webmin and it's fine to have the logos be the same on Webmin and Usermin, they just aren't showing up in Usermin I guess.

Thanks for your time.

@iliajie
Copy link
Collaborator

iliajie commented Apr 5, 2017

I will test it tomorrow for you one more time.

Do you also have updated version of the theme in Usermin?

@brianforan
Copy link
Author

Yes, I have the most recent from the list on the Webmin website.

@iliajie
Copy link
Collaborator

iliajie commented Apr 5, 2017

So after you set up logos in Webmin do they appear in /etc/usermin/authentic-theme?

If you open browsers console, are there any errors?

Are you root user or sudoer?

@iliajie
Copy link
Collaborator

iliajie commented Apr 6, 2017

Ok, I got back to my PC.

I see the reason why this is happening. I will make a patch to make sure that /etc/usermin and /etc/usermin/authentic-theme get proper permissions.

Permissions should be 755 on the directory /etc/usermin/authentic-theme. In case you still need that sticky bit on it, run the following:

chmod 1755 /etc/usermin/authentic-theme otherwise just chmod 755 /etc/usermin/authentic-theme

It will work for you then.

Mentioned directory /etc/usermin/authentic-theme/images is not needed. It's a referrer to /usr/share/usermin/authentic-theme/images.

@iliajie iliajie closed this as completed in d05cfe7 Apr 6, 2017
@iliajie
Copy link
Collaborator

iliajie commented Apr 6, 2017

I also discovered another critical bug there. Thanks for reporting!

Please upgrade the theme from the repo.

@brianforan
Copy link
Author

Hey Ilia. Thanks for all of your help. To apply the hotfix I cloned the repository, should I just manually upload?

@iliajie
Copy link
Collaborator

iliajie commented Apr 6, 2017

Cloning should be enough, to both Webmin and Usermin. After you install it, there is new option to check new version from Git. In the future, you will be able to install new Git version with single click.

@brianforan
Copy link
Author

Ah.. I cloned to my own host OS so I could upload the files manually. I'm not sure I know how to manually install the theme on my server, although I do know how to clone it. Can you link somewhere I can find how to do this on Webmin? I don't mean to badger you with these questions.

@iliajie
Copy link
Collaborator

iliajie commented Apr 6, 2017

Just go on your server to /usr/share/webmin and clone it there.

Before that you would need to delete authentic-theme directory. Do the same for Usermin.

Like I mentioned, after this manual update you will be able to enable Git updates from settings.

@brianforan
Copy link
Author

Hey Ilia, sorry to bother you with this ticket but I'm not sure what to do. I'm still not seeing any images appear in my Usermin instance. I reuploaded the images from Webmin to see if maybe they were out of sync but that didn't fix it. Also spun up a new instance of the server as a whole and recreated my Webmin/Usermin configuration and still not having any success stories.

The screenshot shows the login page with nothing on Usermin
screen shot 2017-04-10 at 1 40 09 pm

Also missing the image that should be on the bottom of the lefthand panel.

@iliajie
Copy link
Collaborator

iliajie commented Apr 10, 2017

Is there a way I could login in check? You can share the credentials using my website. I can't tell why it's not working for you other than what I already did. Or you could wait for the other update of Webmin/Usermin that should be coming quite soon. I guess a week or two.

@brianforan
Copy link
Author

Unfortunately not.. I'm doing this for a work project and don't think it'd be appropriate for me to give out my login details.

Is there a version of anything that I can check in this to check if it's actually getting the right update?

@iliajie
Copy link
Collaborator

iliajie commented Apr 10, 2017

I understand, sure, no problem.

It should be working. After you copied the files or updated the theme and it doesn't work - it might be the cache issue.

You should reload Webmin and Usermin. If it still doesn't work, you could find the processes ids by running:

ps aux | grep -v grep | grep miniserv

The output should be something like:

root     1234  0.0  2.7 210316 113748 ?       Ss   11:28   0:03 /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
root     5678  0.0  0.4 101656 17672 ?        Ss   10:34   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf

and later after you have the process id, kill it manually, like this:

kill -9 1234 
kill -9 5678 

Where 1234 is the Webmin pid and 5678 Usermin pid.

After that run

/etc/webmin/start

and

/etc/usermin/start

@brianforan
Copy link
Author

Did that and still no luck. Should I just wait for the next release?

@iliajie
Copy link
Collaborator

iliajie commented Apr 10, 2017

It's very strange. Can you login as root user and try again, without using sudo?

@brianforan
Copy link
Author

Still nothing. It's so weird because I was thinking maybe the classes were hidden or something but they just aren't even there (classes being ._logo and ._logo_welcomeand neither is the div they belong in.

@iliajie
Copy link
Collaborator

iliajie commented Apr 10, 2017

If you open the source, is it there?

@iliajie
Copy link
Collaborator

iliajie commented Apr 10, 2017

I hope permissions on authentic-theme folder is 755?

@iliajie
Copy link
Collaborator

iliajie commented Apr 10, 2017

Do you have uploaded logos at /etc/usermin/authentic-theme?

@brianforan
Copy link
Author

Logos aren't there. Not sure why, but usermin/ also doesn't have any other files or folders other than authentic-theme. I'm going to reinstall Usermin I think so I can get those files back, I'm not sure where else I'd copy them from.

@iliajie
Copy link
Collaborator

iliajie commented Apr 10, 2017

What are the permissions on etc, usermin and authentic-theme?

@brianforan
Copy link
Author

755 on etc
755 on /etc/usermin
755 on /etc/authentic-theme

I was looking in /usr/share/usermin/authentic-theme for images, it's user/share/usermin/ that only has authentic-theme in it. /etc/usermin/authentic-theme has logo.png as well as logo_welcome.png

@iliajie
Copy link
Collaborator

iliajie commented Apr 10, 2017

There should be no /etc/authentic-theme but /etc/usermin/authentic-theme. Are you running as root?

@brianforan
Copy link
Author

Sorry I missed usermin. The correct third one was /etc/usermin/authentic-theme and it had permissions 755.

@iliajie
Copy link
Collaborator

iliajie commented Apr 10, 2017

Copy *.png from /etc/webmin/authentic-theme to /etc/usermin/authentic-theme. Will it work then?

@brianforan
Copy link
Author

No luck here either

@iliajie
Copy link
Collaborator

iliajie commented Apr 10, 2017

Webmin logo works?

@brianforan
Copy link
Author

The Usermin that I installed from Webmin>Webmin modules>Install webmin.com/usermin on the standard module from ... textbox uses port 20000, and Webmin runs on port 10000.

@iliajie
Copy link
Collaborator

iliajie commented Apr 10, 2017

Very interesting. I will have to take a deeper look into that. I have never heard of installing Usermin itself as a module.

What is the output of ps command I mentioned before?

@iliajie
Copy link
Collaborator

iliajie commented Apr 10, 2017

..and what is the output of whereis usermin and whereis webmin?

@iliajie
Copy link
Collaborator

iliajie commented Apr 11, 2017

It's important, what is the output of commands above?

@iliajie
Copy link
Collaborator

iliajie commented Apr 11, 2017

The Usermin that I installed from Webmin>Webmin modules>Install webmin.com/usermin on the standard module from ... textbox uses port 20000, and Webmin runs on port 10000.

What you installed is Usermin module for Webmin, that will let you manage installed version Usermin.

@brianforan
Copy link
Author

brianforan commented Apr 11, 2017

Sorry, was probably commuting/sleeping when you responded.

Result of ps

root      3269  0.0  2.7  90312 27756 ?        Ss   Apr10   0:02 /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf
root      4363  0.0  2.1  78116 21720 ?        Ss   Apr10   0:00 /usr/bin/perl /usr/local/usermin-1.701/miniserv.pl /etc/usermin/miniserv.conf

usermin: /etc/usermin /usr/share/usermin

webmin: /etc/webmin /usr/share/webmin

@iliajie
Copy link
Collaborator

iliajie commented Apr 11, 2017

..and what is the output of whereis usermin and whereis webmin?

@brianforan
Copy link
Author

Respectively:

usermin: /etc/usermin /usr/share/usermin

webmin: /etc/webmin /usr/share/webmin

@iliajie
Copy link
Collaborator

iliajie commented Apr 11, 2017

..and at the same time /usr/share/usermin is empty?

@brianforan
Copy link
Author

Not entirely. Here's ls -lsa /usr/share/usermin - I just think it's strange that it's so 'empty' compared to the ls of /usr/share/webmin

4 drwxr-xr-x   4 root root 4096 Apr 10 15:40 .
4 drwxr-xr-x 117 root root 4096 Apr  7 16:50 ..
4 drwxr-xr-x  10 root root 4096 Apr 10 13:27 authentic-theme
4 drwxr-xr-x   6 root root 4096 Jan 10 04:13 filemin

@iliajie
Copy link
Collaborator

iliajie commented Apr 11, 2017

You have strange install. How did you install Usermin?

@brianforan
Copy link
Author

From within Webmin I went to Webmin Configuration, then Webmin Modules, then where it says install from webmin.com I typed in Usermin and installed like that.

@iliajie
Copy link
Collaborator

iliajie commented Apr 11, 2017

No. You could only install Usermin module to control Usermin with it. In case it wasn't installed, you would have to click install button from inside Webmin/Usermin Configuration first to install .deb package. Remember doing it?

@brianforan
Copy link
Author

Ahh yes I remember what you're talking about now, vaguely. Maybe I should remove Usermin entirely and reinstall so that I can have all of this from scratch.

@iliajie
Copy link
Collaborator

iliajie commented Apr 11, 2017

Sure, go ahead. Save configuration first, just in case.

@brianforan
Copy link
Author

Ok, I uninstalled and reinstalled. Reinstalled theme with direct github link. Still no logos. How I installed was after I ran /etc/usermin/uninstall.sh I deleted the /usr/share/usermin folder then when I clicked Usermin Configuration it said something like Usermin is not installed, but we can install it automatically for you by clicking here so I clicked that and it installed the tar.gz of Usermin.

Now Usermin works.

@brianforan
Copy link
Author

I also made sure /etc/usermin/authentic-theme was set to 755.

@iliajie
Copy link
Collaborator

iliajie commented Apr 12, 2017

Still no logo?

@brianforan
Copy link
Author

Yep, I'm going to see about just getting a fresh instance that I can install webmin from scratch on. Something doesn't seem right

@brianforan
Copy link
Author

The problem is not occurring on my own instance of Webmin/Usermin, which I did a complete fresh install with. So I guess it's somewhere in the actual install of my other instance.

@iliajie
Copy link
Collaborator

iliajie commented Apr 12, 2017

It's interesting for me to find out what is that, really.

@brianforan
Copy link
Author

I'm not sure this issue will ever occur for anyone else. I think the install is from a good amount of time ago. I can try to trace through the folders and see what is in the wrong place, though..

@brianforan
Copy link
Author

I will note however that the folder /usr/share/usermin/ was created in this install. It wasn't created in the last. I installed Usermin by wgetting it from the website and then used dkpg --install, instead of downloading from the Webmin interface. Maybe I can fix our other server by doing that, I'll try it and let you know.

This has definitely been a learning experience if anything

@brianforan
Copy link
Author

On the server that this ticket originated with, I reinstalled Usermin and reinstalled the latest version of authentic from github. logo.png is showing on the bottom left of the authenticated page, but still logo_welcome.png is missing. any idea?

Both logos are in /etc/usermin/authentic-theme/

@iliajie
Copy link
Collaborator

iliajie commented Apr 12, 2017

I don't see how it's possible. The only thing I could recommend is to refresh the page using browser's reload button or just hitting F5.

@brianforan
Copy link
Author

Yeah I was thinking how is this possible? too. I opened in incognito and it wasn't working there either.. I'll try killing the processes again and rebooting them manually and see if that helps

@iliajie
Copy link
Collaborator

iliajie commented Apr 12, 2017

Sure, go ahead.

@brianforan
Copy link
Author

that did it. all working now with the logos, thanks for your assistance along the way.

@iliajie
Copy link
Collaborator

iliajie commented Apr 12, 2017

You're welcome. I'm glad to be helpful.

iliajie pushed a commit that referenced this issue May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants