Wouter Coppens wrote:
Hi all,
I noticed something strange. I go to Advanced -> System policy -> Card
Users.
If I set the policy to All Users, the env variables looks like:
USER=root
DTDEVROOT=/tmp/SUNWut/sessions/3
SUN_SUNRAY_TOKEN=Payflex.5006e88f00130100
On the otherhand, if I set it to Users with Registered Tokens, it becomes
USER=root
DTDEVROOT=/tmp/SUNWut/sessions/2
SUN_SUNRAY_TOKEN=user.1243414053-2914
I don¹t thin it¹s normal behaviour. It causes a problem when using Mitel
phones.
Yes, this is normal behavior. When you register a token you get a
"logical token" format token name. This is how token aliasing works
(utuser -ai) - two different tokens map to the same "logical token"
(i.e. "user.*"), so they can both access the same session.
What sort of problem is this causing with Mitel phones?
If you know that the site won't be using the "token aliasing" feature
(i.e. if there's only one, unambiguous raw token associated with each
logical token), you can map the logical token ("user.*") to the raw
token (e.g. Payflex.*) by using:
utuser -p $SUN_SUNRAY_TOKEN | awk '
/^..*$/ { token = $1 }
END { print token }
'
This awk code prints the first field on the last non-empty line of the
output, which is a raw token corresponding to the logical token. If you
*are* expecting token aliasing to be utilized, then your only recourse
is (as root) to read the /var/opt/SUNWut/displays/DISPLAY file to
determine the INSERT_TOKEN, or if you can't run your code as root you
can do a status callback to utauthd (this is somewhat expensive and may
not scale):
echo status tokenName=$SUN_SUNRAY_TOKEN | /opt/SUNWut/lib/utnetpipe
localhost 7010 | sed -n 's/^LocalName=//p'
-Bob
_______________________________________________
SunRay-Users mailing list
SunRay-Users@filibeto.org
http://www.filibeto.org/mailman/listinfo/sunray-users