Re: Set ip lan address /etc/environment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux