[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ubuntu-users
Subject:    Re: ${LOGNAME} vs. ${USER}
From:       Johnny Rosenberg <gurus.knugum () gmail ! com>
Date:       2015-07-31 11:45:43
Message-ID: CADo7T4c0UuW-AYAXxiLwAztUNA5LDO=R=POpfHFGVK_7Ow-xDg () mail ! gmail ! com
[Download RAW message or body]

2015-07-30 15:41 GMT+02:00  <silver.bullet@zoho.com>:
> On Thu, 30 Jul 2015 04:19:44 -0700, Tom H wrote:
>>On Thu, Jul 30, 2015 at 3:23 AM,  <silver.bullet@zoho.com> wrote:
>>> I'm booted to Arch Linux at the moment, but it shouldn't differ
>>> What you need for your usage, depends on what you want to achieve.
>>>
>>> Take a look at the differences, especial how it differs after running
>>> sudo or su.
>>>
>>> $ echo $LOGNAME $USER $(id -un) $EUID $(id -u)
>>> rocketmouse rocketmouse rocketmouse 1000 1000
>>>
>>> $ sudo -i
>>> # echo $LOGNAME $USER $(id -un) $EUID $(id -u)
>>> root root root 0 0
>>>
>>> $ su
>>> # echo $LOGNAME $USER $(id -un) $EUID $(id -u)
>>> rocketmouse rocketmouse root 0 0
>>
>>Sure, using su and sudo changes things but that's not what the OP was
>>asking about - unless I misunderstood the question.
>
> Btw. just setting up a root account for Ubuntu by passwd root, Ubuntu does
> behave different than my Arch.
>
> [weremouse@moonstudio ~]$ echo $LOGNAME $USER $(id -un) $EUID $(id -u)
> weremouse weremouse weremouse 1000 1000
>
> [weremouse@moonstudio ~]$ sudo -i
> [root@moonstudio ~]# echo $LOGNAME $USER $(id -un) $EUID $(id -u)
> root root root 0 0
>
> [weremouse@moonstudio ~]$ su
> [root@moonstudio weremouse]# echo $LOGNAME $USER $(id -un) $EUID $(id -u)
> root root root 0 0

I couldn't even test the last one, since I don't have a root password
configured.
Anyway, thank you all for replying!


Regards

Johnny Rosenberg
ジョニー・ローゼンバーグ


>
> Regards,
> Ralf
>
>
> --
> ubuntu-users mailing list
> ubuntu-users@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

-- 
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic