AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  Cannot get "LOGNAME" variable.

    Posted Thu December 24, 2009 11:49 AM

    Originally posted by: SystemAdmin


    while trying to su from one server to other im getting the error saying "cannot get LOGNAME variable"
    can any body come across this type of error please let me know how to resolve this issue

    server1# su - server2
    Cannot get "LOGNAME" variable.

    Thanks in advance
    Kiran


  • 2.  Re: Cannot get "LOGNAME" variable.

    Posted Sun January 03, 2010 12:17 PM

    Originally posted by: nagger


    First the "su" command is used to change user - NOT change server.
    Are you sure you using the right command?

    Second, my AIX says that LOGNAME is a special read-only shell variable.
    You can't change it at the shell prompt not unset it.
    I think this is set to by the system when you log in and can't normally be changed.

    Third, perhaps you have managed to log in via some odd route and not got this set.
    echo $LOGNAME
    If you don't get your user name then thnings are bad.
    Perhaps, your ID was deleted after you logged in or there is problems accessing /etc/passwd
    or some equally bad situation.
    The command: id
    should show your user identity, both name and number.
    The command: echo $USER
    should show your user identity.

    If these work then things are not so bad.

    Hope this helps, ta Nigel