Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
courier webadmin setup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
rtwick
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2002
Posts: 138
Location: Philadelphia

PostPosted: Tue Aug 27, 2002 4:28 am    Post subject: courier webadmin setup Reply with quote

Hi all,
just trying to buildup a box with gentoo. I have installed the courier mta package and i would like ot use the webadmin feature of courier but can not figure out anyway how to setup the webadmin passwd.

earlier I used to compile courier from scratch but there was a make web-admin-password or something like that which was creating the password but now I can not find that rule in the source tarball.

any idea?

R'twick
Back to top
View user's profile Send private message
btg308
n00b
n00b


Joined: 14 Aug 2002
Posts: 72
Location: Östersund, Sweden

PostPosted: Sat Sep 07, 2002 11:48 am    Post subject: make install-webadmin-password Reply with quote

Found it in the main Courier Makefile.in in the 0.39.3 tarball (not the one in the webadmin subdir, mind you)

Code:

install-webadmin-password:
        @stty -echo ; echo -n "Password: " ; read P; stty echo ; echo "" ; echo $$P >@sysconfdir@/webadmin/password && chown @mailuser@ @sysconfdir@/webadmin/password && chgrp @mailgroup@ @sysconfdir@/webadmin/password && chmod 400 @sysconfdir@/webadmin/password


So just do that stuff manually and you should be fine. ;-)

(Hint: @sysconfdir is /etc/courier in Gentoo, NOT /usr/lib/courier like Courier's installation docs says)
Back to top
View user's profile Send private message
mooman
Apprentice
Apprentice


Joined: 06 Nov 2002
Posts: 175
Location: Vancouver, WA

PostPosted: Tue Nov 26, 2002 5:59 am    Post subject: Reply with quote

I dunno if the original poster ran into this, but I found lots of posts around the net about people who couldn't get the webadmin password to work, and no answers! So after extensive trial and error and some perl hacking, i solved it (at least for me) and wanted to document the results in case anyone else had problems:

As the original poster points out, the courier instructions want you to execute a make command to create the password, something that isn't an option for us emergers.

The password.dist file gives you most of the steps you need to manually create that file:
Quote:

# 1. Open /etc/courier/webadmin/password for editing
# 2. There should be one word in this file. The webadmin password
# 3. chown mail:mail password
# 4. chmod 400 password
#
# Thanks to Fernando Tobler on bug #10574 for the concise instructions


But that wasn't enough to get it to work for me.
1. Make sure the webadmin cgi is somewhere that apache can run it
2. Make sure the /etc/courier/webadmin directory has all the execute permissions set: chmod 755 /etc/courier/webadmin
3. I couldn't get the password file to get read until I did chown apache:apache password

Maybe that last step is because something else isn't configured right, but I couldn't find it. It took almost a day and a half of poking through perl scripts and adding debugging to get the workaround figured out... Hopefully it helps someone out!

Words to seed search engine: courier webadmin courierwebadmin invalid password
_________________
Linux user off and on since circa 1995
Back to top
View user's profile Send private message
Scytale
n00b
n00b


Joined: 01 May 2003
Posts: 70
Location: Mannheim, BW, Germany

PostPosted: Thu May 01, 2003 10:50 pm    Post subject: Solved mooman's chown problem Reply with quote

Quote:
Maybe that last step is because something else isn't configured right, but I couldn't find it.

Did you check the owner and modes for the webadmin CGI file? They need to be like this:
Code:
-r-sr-xr-x    1 root     bin          3396 May  2 00:12 webadmin

chown'ing the password file to apache:apache is a workaround to make webadmin able to read it, but as soon as the webadmin script tries to read or modify any Courier config file it has no access to it. At least this was the case at my box.
_________________
Never stop using your brain.
Back to top
View user's profile Send private message
hachre
n00b
n00b


Joined: 21 Jan 2003
Posts: 59
Location: Munich, Germany

PostPosted: Sat Jul 05, 2003 12:43 am    Post subject: Reply with quote

i still don't get this running...
the earlier posts helped but everytime i press save in the webadmin menu it can't access the files to write them :(
_________________
He's not much to look at but it's sooo hard to find a family guy...
Back to top
View user's profile Send private message
jkliff
n00b
n00b


Joined: 20 Jun 2003
Posts: 16
Location: Porto Alegre, RS, Brazil

PostPosted: Fri Nov 07, 2003 3:18 pm    Post subject: Reply with quote

Hi,
Altough this thread seems a little old, I'm having the exact same problema on a 0.43.1 Courier install. I saw rtwicks thread on courier-users, but that didn't seem to clarify the problem to me.
Any of you have had any success with this subject?
Any halp is appreciated.

Thanks
Back to top
View user's profile Send private message
hachre
n00b
n00b


Joined: 21 Jan 2003
Posts: 59
Location: Munich, Germany

PostPosted: Fri Nov 07, 2003 5:16 pm    Post subject: Reply with quote

i'm still unable to use the web mail feature...

im using squirrelmail instead..
_________________
He's not much to look at but it's sooo hard to find a family guy...
Back to top
View user's profile Send private message
jkliff
n00b
n00b


Joined: 20 Jun 2003
Posts: 16
Location: Porto Alegre, RS, Brazil

PostPosted: Mon Nov 10, 2003 6:01 pm    Post subject: Reply with quote

I sort of managed to have webadmin running (working on webmail right now -- although I consider squirrelmail for webmail), as I *really* needed it for configuration right now. Anyway, I only got it working without ssl support. I'll be working on this as soon as possible.
After all, it seems to be pretty straight forward:

1. Copy /usr/lib/courier/courier/webmail/webadmin to /home/httpd/cgi-bin/, preserving the attributes
Code:
cp -p

2. Do as told in /etc/courier/webadmin/password.dist
3. Create the unsecureok file
Code:
touch /etc/courier/webadmin/unsecureok


Then, just browse to http://server/cgi-bin/webadmin.

Hope this has been of some help. I'll keep posting my advances.
Back to top
View user's profile Send private message
meulie
l33t
l33t


Joined: 17 Jun 2003
Posts: 845
Location: a Dutchman living in Norway

PostPosted: Tue May 11, 2004 4:58 pm    Post subject: Reply with quote

Hmm, I get the following if I do this:

Code:
[Tue May 11 18:57:19 2004] [error] [client 192.168.2.24] attempt to invoke directory as script: /var/www/localhost/cgi-bin/courierwebadmin/



Any suggestions anyone?
_________________
Greetz,
Evert Meulie
Back to top
View user's profile Send private message
henniez-swisswater
n00b
n00b


Joined: 07 Sep 2005
Posts: 16

PostPosted: Tue Jul 03, 2007 5:16 pm    Post subject: Reply with quote

hi there

here is what i did.

1) cp -p /usr/lib/courier/courier/webmail/webadmin /var/www/localhost/cgi-bin/
2) I configuered apache to use ssl (used the postfix howto http://www.gentoo.org/doc/en/virt-mail-howto.xml)
3) changed the /etc/courier/webadmin/password file
4) chown mail:mail /etc/courier/webadmin/password
5) chmod 400 /etc/courier/webadmin/password


and that's it


hope it will work for you as well
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum