30 May
2018
30 May
'18
12:17 p.m.
Hi Maykel,
Put file /etc/profile.d/ip.sh with the content:
ip="$(ifconfig | grep -A 1 'eth0' | tail -1 | cut -d ':' -f 2 | cut -d ' ' -f 1)"
To debug this kind of thing, e.g. to see if it even runs, intersperse tee(1)s to files that can be inspected afterwards. ip="$(ifconfig | tee /tmp/d.ifc | grep -A 1 'eth0' | tail -1 | tee ...
/etc/security/pam_env.conf : ip DEFAULT="" OVERRIDE="$(ifconfig | grep -A 1
I see nothing to suggest PAM supports sh's `$()' syntax, and wouldn't expect it to. -- Cheers, Ralph. https://plus.google.com/+RalphCorderoy