Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 721 of 806  Not logged in ELOG logo
New entries since:Thu Jan 1 01:00:00 1970
ID Date Icon Author Author Emailup Category OS ELOG Version Subject
  68676   Tue Aug 22 18:29:02 2017 Question Stefano Bonaldostefano.bonaldo.13@gmail.comQuestionMac OSXv3.1.2Hide logbook tab when not authorized

Hello, I read carefully the manual, but I didn't find a way to hide the logbooks in the logbook bar and in the initial logbook selection for which the user does not have the access. So, if a user1 does not have the access to a specific logbook, user1 is not able to see that logbook in the bar and neither in the initial logbook selection. How can I do this without using the top groups?

  68679   Wed Aug 23 20:09:39 2017 Reply Stefano Bonaldostefano.bonaldo.13@gmail.comQuestionMac OSXv3.1.2Re: Hide logbook tab when not authorized

Hi Andreas,

many thanks for your answer. I partially agree with you, because sometimes "for privacy" of my working group I don't want that other users (external users) know the existance of the other logbooks.

Do you think that will be implemented in future?

Best regards, Stefano

Andreas Luedeke wrote:

Hi Stefano,

I think your assessment is correct: it is not possible to hide a logbook based on your read/write privileges.
And I'm not even sure that this would make much sense: at least you need to be able to get to the login page of the logbook.
But if you don't have read privileges for a logbook, you'll be automatically redirected to the login page, as soon as you select this logbook.

Kind Regards, Andreas

Stefano Bonaldo wrote:

Hello, I read carefully the manual, but I didn't find a way to hide the logbooks in the logbook bar and in the initial logbook selection for which the user does not have the access. So, if a user1 does not have the access to a specific logbook, user1 is not able to see that logbook in the bar and neither in the initial logbook selection. How can I do this without using the top groups?

 

 

  Draft   Wed Sep 23 23:57:43 2015 Warning Stefanostefano.colafranceschi@gmail.comQuestionLinux3.1.0elog from php

Hi,

I need to run elog command in an online php script. The problem I see is that the script works from the command line but not from the browser. In the script I just use:

system(elog -h mypc -p 8080 -l bla -a Author=\'io\' -a Type=\' ..etc.etc

any suggestions?

  68128   Sat Sep 26 03:34:44 2015 Reply Stefanostefano.colafranceschi@gmail.comQuestionLinux3.1.0Re: Elog command not working properly
Yes it was a path issue PHP was not loading correctly environmental path

> > <p>Hi,</p>
> > 
> > <p>I have a problem running elog command from php script. Basically in the php I call system(&quot;elog -h etc etc.. And from the php command line works but not in the browser apparently without errors (php apache 
> logfile no problem), any suggestions?</p>
> 
> Hey,
> this sounds more like a PHP issue.
> Which PHP version are you using? 
> Which webserver? 
> Which php function are you using: shell_exec() or exec()? Try looking at the return of exec()
> Is the elog file set to the correct file permissions to be executed by the webserver?
> Is the elog file in the PHP path or do you take care of defining the correct path?
> 
> 
> eddy
  68592   Thu Apr 6 17:36:46 2017 Question Stefano Lacaprarastefano.lacaprara@pd.infn.itQuestionLinux3.1.1command line and apache+ldap authentication
Hi,
  we are running an elogd (with SSL) server on a machine and using apache as a proxy.

The authentication to the apache server is managed via LDAP module directly by apache, while, so far, we have no authentication enabled in the elogd server itself.
So, when a used want to access the elog server, he is required to provide user/pwd by apache, and then he can access the elogs.

We would like to use the elog command line to transit entries automatically from a terminal from a different host.

the command line we are trying is:

echo "Test" | elog -v -h elog.belle2.org -a Author="stefano" -a Type="Other" -l elog -s demo -u username password  -p 443

where username password are registered into LDAP.

In response we have a 401 Unauthorized. The full return message is at the end of this message.

I suspect that the "username password" we pass to elog are supposed to be that of elogd, not that of apache/ldap: I don't know if this is the case.

Does anyone have an idea how to make this work?

Thanks in advance,
  Stefano

Successfully connected to host elog.belle2.org, port 443
Request sent to host:
POST /elog/ HTTP/1.0
Content-Type: multipart/form-data; boundary=---------------------------44BDB584269C5EEC3F73204
Host: elog.belle2.org:443
User-Agent: ELOG
Content-Length: 946


Content sent to host:
---------------------------44BDB584269C5EEC3F73204
Content-Disposition: form-data; name="cmd"

Submit
---------------------------44BDB584269C5EEC3F73204
Content-Disposition: form-data; name="unm"

xxxxxxxx
---------------------------44BDB584269C5EEC3F73204
Content-Disposition: form-data; name="upwd"

xxxxxxxx
---------------------------44BDB584269C5EEC3F73204
Content-Disposition: form-data; name="exp"

elog
---------------------------44BDB584269C5EEC3F73204
Content-Disposition: form-data; name="encoding"

ELCode
---------------------------44BDB584269C5EEC3F73204
Content-Disposition: form-data; name="Author"

stefano
---------------------------44BDB584269C5EEC3F73204
Content-Disposition: form-data; name="Type"

Other
---------------------------44BDB584269C5EEC3F73204
Content-Disposition: form-data; name="Text"

demo
---------------------------44BDB584269C5EEC3F73204

Response received:
HTTP/1.1 401 Unauthorized
Date: Thu, 06 Apr 2017 15:32:37 GMT
Server: Apache/2.4.18 (Ubuntu)
WWW-Authenticate: Basic realm="Belle II internal"
Content-Length: 463
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Unauthorized</title>
</head><body>
<h1>Unauthorized</h1>
<p>This server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
<hr>
<address>Apache/2.4.18 (Ubuntu) Server at elog.belle2.org Port 443</address>
</body></html>

Error transmitting message
  68620   Tue May 16 10:21:18 2017 Entry Stefano Lacaprarastefano.lacaprara@pd.infn.itQuestionLinux3.1.1Use X-Forwarded-User as preset in author field
Hi,
  I have an elog server which uses apache/ldap for authentication.
I would like to have the username used for ldap to be set automatically as author field in the elog.

I'm using: 
Authentication = Webserver
and I do set the env-variable X-Forwarded-User correctly to the ldap username

GET /test/?cmd=New HTTP/1.1
Host: localhost:8080
Authorization: Basic bGFjYXByYXI6TWEwMiSyYnVt
...
Cookie: elmode=Summary; sid=D7DE678B7CAA1D10; ufnm=lacaprar; urem=0
...
X-Forwarded-User: lacaprar

How can I preset author to X-Forwarded-User?
Preset Author = $??
I've tried $short_name/$long_name but I got Anonymous.
I understand that it is so because these are meant to be filled when password authentication is used: any way to use some other variable with the Webserver auth?

thanks in advance,
  Stefano
  68622   Thu May 18 09:39:16 2017 Reply Stefano Lacaprarastefano.lacaprara@pd.infn.itQuestionLinux3.1.1Re: Use X-Forwarded-User as preset in author field
> I use an older version of elog, but
>  
> Preset Author = $short_name <$long_name>
> 
> works for me.
> 
> One thing to note is that I also have :
> Self register = 1
> 
> So at first login, the user has to type in his name and email adress,
> maybe that's why you got "Anonymous". (Otherwise the variable $shortname etc. are not set.)
> 
> HTH,
> 
> Christof

Many thanks for your answer.
however it seems that your solution requires to have a eLog "password" authentication, which I'd like to avoid since I'd like to use only webserver one.

best,
  Stefano
  68625   Thu May 18 16:55:42 2017 Reply Stefano Lacaprarastefano.lacaprara@pd.infn.itQuestionLinux3.1.1[solved] Re: Use X-Forwarded-User as preset in author field
> 
> Sorry, I just double-checked, this userdatabase, I was talking about is the Password-file...
> 
> Please try the following snippet :
> 
> allow password change = 0
> Authentication = Webserver, File
> Preset Author = $short_name <$long_name>
> Locked Attributes = Author
> Password file = PASSWD.file
> 
> Christof

Many thanks, that is what I was looking for.

best,
  Stefano
ELOG V3.1.5-3fb85fa6