Hello, I have Freeradius 2.1.10. I need use script for getting cleartext passwords from external system. I try this in authorize section: update control { Cleartext-Password = `%{exec:/usr/local/bin/my-script %{User-Name}}` } But in freeradius -X is: Executing /usr/local/bin/my-script %{User-Name} expand: %{User-Name} -> testuser result 0 expand: %{exec:/usr/local/bin/my-script %{User-Name}} -> Exec-Program output: Exec-Program: FAILED to execute : No such file or directory Exec-Program-Wait: plaintext: Exec-Program: FAILED to execute : No such file or directory Exec-Program: returned: 1 But it is not true: ls -l /usr/local/bin/my-script -rwxr-xr-x 1 root root 580 Nov 13 14:08 /usr/local/bin/my-script Please, help me, what can be wrong? Thank you, Miroslav
On 13/11/13 13:44, Miroslav Lednicky wrote:
Hello,
I have Freeradius 2.1.10. I need use script for getting cleartext passwords from external system.
I try this in authorize section:
update control { Cleartext-Password = `%{exec:/usr/local/bin/my-script %{User-Name}}` }
But in freeradius -X is:
Executing /usr/local/bin/my-script %{User-Name} expand: %{User-Name} -> testuser result 0 expand: %{exec:/usr/local/bin/my-script %{User-Name}} -> Exec-Program output: Exec-Program: FAILED to execute : No such file or directory Exec-Program-Wait: plaintext: Exec-Program: FAILED to execute : No such file or directory Exec-Program: returned: 1
But it is not true:
ls -l /usr/local/bin/my-script -rwxr-xr-x 1 root root 580 Nov 13 14:08 /usr/local/bin/my-script
Please, help me, what can be wrong?
What operating system are you running? SELinux can often block accesses like this, even if the permissions seem to be correct.
Miroslav Lednicky wrote:
I have Freeradius 2.1.10. I need use script for getting cleartext passwords from external system.
I try this in authorize section:
update control { Cleartext-Password = `%{exec:/usr/local/bin/my-script %{User-Name}}`
That is wrong. Read "man unlang". The back-quotes `foo` say "run the string foo as if it had been typed on the command line". There is no command called "%{exec...", so it fails. The solution is to simplify the string: Cleartext-Password = `/usr/local/bin/my-script %{User-Name}` Alan DeKok.
Hello, it works! Thank you very much, Miroslav Dne 13.11.2013 15:31, Alan DeKok napsal(a):
Miroslav Lednicky wrote:
I have Freeradius 2.1.10. I need use script for getting cleartext passwords from external system.
I try this in authorize section:
update control { Cleartext-Password = `%{exec:/usr/local/bin/my-script %{User-Name}}`
That is wrong. Read "man unlang".
The back-quotes `foo` say "run the string foo as if it had been typed on the command line".
There is no command called "%{exec...", so it fails.
The solution is to simplify the string:
Cleartext-Password = `/usr/local/bin/my-script %{User-Name}`
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (3)
-
Alan DeKok -
Jonathan Gazeley -
Miroslav Lednicky