logname: no login name

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I am trying to understand the differences between logname and LOGNAME from Difference between logname and $LOGNAME and https://askubuntu.com/questions/490620/difference-between-logname-and-logname



On Lubuntu 18.04, why did I get logname: no login name?



t@ocean:/t/t/bkg$ echo $LOGNAME
t
t@ocean:/t/t/bkg$ logname
logname: no login name
t@ocean:/t/t/bkg$ su t
Password:
t@ocean:/t/t/bkg$ logname
logname: no login name
$ echo $?
1
t@ocean:/t/t/bkg$ cat /var/run/utmp
~~~reboot4.15.0-22-generic��[8Jtty1tty1LOGINJ��[�!�tty7:0t:0��[��5~~~runlevel4.15.0-22-generic��[

t@ocean:/t/t/bkg$ sudo su
[sudo] password for t:
root@ocean:/tmp/test/bkg# logname
logname: no login name
root@ocean:/tmp/test/bkg# echo $LOGNAME
root


What is logname supposed to output?
Thanks.



From man logname:




logname - print user´s login name



Print the name of the current user.





To address the comments:



$ cat /proc/self/loginuid
4294967295

t@ocean:/t/t/bkg$ grep ":$(id -u):" /etc/passwd
t:x:1000:1000:t,,,:/home/t:/bin/bash

t@ocean:/t/t/bkg$ tty
/dev/pts/8
t@ocean:/t/t/bkg$ w
17:52:08 up 5 days, 6:28, 1 user, load average: 0.39, 0.29, 0.28
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
t tty7 :0 Wed11 5days 1:47m 6.33s /usr/bin/lxsession -s Lubuntu -e LXDE


Mark suspected the cause is that my lxterminal doesn't add an entry to utmp.



Pandya: Oh. Seems a bug with entry as you've concluded.







share|improve this question





















  • Comments are not for extended discussion; this conversation has been moved to chat.
    – terdon♦
    May 31 at 8:46










  • Moving the helpful comments into a chatroom, which will disappear eventually, is very unfortunate. I have to manually save some comments from the chatroom.
    – Tim
    May 31 at 17:47











  • If the comments are useful, they should be moved to the question or answer they are commenting upon. Comments are designed to be ephemeral and are not the place to have discussions.
    – terdon♦
    May 31 at 17:53











  • Yet I had to copy others' comments into my question. I am on the side with what this user said in his profile unix.stackexchange.com/users/21167/zwol on this matter
    – Tim
    May 31 at 18:00







  • 1




    The policy saying comments are not for extended discussion is an incorrect and harmful policy. The discussion of a question or answer belongs with the question or answer, i.e. in the comments. I have refused to cooperate with this policy for years and I advise you to do the same, Tim. @terdon
    – zwol
    Jun 1 at 0:37















up vote
0
down vote

favorite












I am trying to understand the differences between logname and LOGNAME from Difference between logname and $LOGNAME and https://askubuntu.com/questions/490620/difference-between-logname-and-logname



On Lubuntu 18.04, why did I get logname: no login name?



t@ocean:/t/t/bkg$ echo $LOGNAME
t
t@ocean:/t/t/bkg$ logname
logname: no login name
t@ocean:/t/t/bkg$ su t
Password:
t@ocean:/t/t/bkg$ logname
logname: no login name
$ echo $?
1
t@ocean:/t/t/bkg$ cat /var/run/utmp
~~~reboot4.15.0-22-generic��[8Jtty1tty1LOGINJ��[�!�tty7:0t:0��[��5~~~runlevel4.15.0-22-generic��[

t@ocean:/t/t/bkg$ sudo su
[sudo] password for t:
root@ocean:/tmp/test/bkg# logname
logname: no login name
root@ocean:/tmp/test/bkg# echo $LOGNAME
root


What is logname supposed to output?
Thanks.



From man logname:




logname - print user´s login name



Print the name of the current user.





To address the comments:



$ cat /proc/self/loginuid
4294967295

t@ocean:/t/t/bkg$ grep ":$(id -u):" /etc/passwd
t:x:1000:1000:t,,,:/home/t:/bin/bash

t@ocean:/t/t/bkg$ tty
/dev/pts/8
t@ocean:/t/t/bkg$ w
17:52:08 up 5 days, 6:28, 1 user, load average: 0.39, 0.29, 0.28
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
t tty7 :0 Wed11 5days 1:47m 6.33s /usr/bin/lxsession -s Lubuntu -e LXDE


Mark suspected the cause is that my lxterminal doesn't add an entry to utmp.



Pandya: Oh. Seems a bug with entry as you've concluded.







share|improve this question





















  • Comments are not for extended discussion; this conversation has been moved to chat.
    – terdon♦
    May 31 at 8:46










  • Moving the helpful comments into a chatroom, which will disappear eventually, is very unfortunate. I have to manually save some comments from the chatroom.
    – Tim
    May 31 at 17:47











  • If the comments are useful, they should be moved to the question or answer they are commenting upon. Comments are designed to be ephemeral and are not the place to have discussions.
    – terdon♦
    May 31 at 17:53











  • Yet I had to copy others' comments into my question. I am on the side with what this user said in his profile unix.stackexchange.com/users/21167/zwol on this matter
    – Tim
    May 31 at 18:00







  • 1




    The policy saying comments are not for extended discussion is an incorrect and harmful policy. The discussion of a question or answer belongs with the question or answer, i.e. in the comments. I have refused to cooperate with this policy for years and I advise you to do the same, Tim. @terdon
    – zwol
    Jun 1 at 0:37













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am trying to understand the differences between logname and LOGNAME from Difference between logname and $LOGNAME and https://askubuntu.com/questions/490620/difference-between-logname-and-logname



On Lubuntu 18.04, why did I get logname: no login name?



t@ocean:/t/t/bkg$ echo $LOGNAME
t
t@ocean:/t/t/bkg$ logname
logname: no login name
t@ocean:/t/t/bkg$ su t
Password:
t@ocean:/t/t/bkg$ logname
logname: no login name
$ echo $?
1
t@ocean:/t/t/bkg$ cat /var/run/utmp
~~~reboot4.15.0-22-generic��[8Jtty1tty1LOGINJ��[�!�tty7:0t:0��[��5~~~runlevel4.15.0-22-generic��[

t@ocean:/t/t/bkg$ sudo su
[sudo] password for t:
root@ocean:/tmp/test/bkg# logname
logname: no login name
root@ocean:/tmp/test/bkg# echo $LOGNAME
root


What is logname supposed to output?
Thanks.



From man logname:




logname - print user´s login name



Print the name of the current user.





To address the comments:



$ cat /proc/self/loginuid
4294967295

t@ocean:/t/t/bkg$ grep ":$(id -u):" /etc/passwd
t:x:1000:1000:t,,,:/home/t:/bin/bash

t@ocean:/t/t/bkg$ tty
/dev/pts/8
t@ocean:/t/t/bkg$ w
17:52:08 up 5 days, 6:28, 1 user, load average: 0.39, 0.29, 0.28
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
t tty7 :0 Wed11 5days 1:47m 6.33s /usr/bin/lxsession -s Lubuntu -e LXDE


Mark suspected the cause is that my lxterminal doesn't add an entry to utmp.



Pandya: Oh. Seems a bug with entry as you've concluded.







share|improve this question













I am trying to understand the differences between logname and LOGNAME from Difference between logname and $LOGNAME and https://askubuntu.com/questions/490620/difference-between-logname-and-logname



On Lubuntu 18.04, why did I get logname: no login name?



t@ocean:/t/t/bkg$ echo $LOGNAME
t
t@ocean:/t/t/bkg$ logname
logname: no login name
t@ocean:/t/t/bkg$ su t
Password:
t@ocean:/t/t/bkg$ logname
logname: no login name
$ echo $?
1
t@ocean:/t/t/bkg$ cat /var/run/utmp
~~~reboot4.15.0-22-generic��[8Jtty1tty1LOGINJ��[�!�tty7:0t:0��[��5~~~runlevel4.15.0-22-generic��[

t@ocean:/t/t/bkg$ sudo su
[sudo] password for t:
root@ocean:/tmp/test/bkg# logname
logname: no login name
root@ocean:/tmp/test/bkg# echo $LOGNAME
root


What is logname supposed to output?
Thanks.



From man logname:




logname - print user´s login name



Print the name of the current user.





To address the comments:



$ cat /proc/self/loginuid
4294967295

t@ocean:/t/t/bkg$ grep ":$(id -u):" /etc/passwd
t:x:1000:1000:t,,,:/home/t:/bin/bash

t@ocean:/t/t/bkg$ tty
/dev/pts/8
t@ocean:/t/t/bkg$ w
17:52:08 up 5 days, 6:28, 1 user, load average: 0.39, 0.29, 0.28
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
t tty7 :0 Wed11 5days 1:47m 6.33s /usr/bin/lxsession -s Lubuntu -e LXDE


Mark suspected the cause is that my lxterminal doesn't add an entry to utmp.



Pandya: Oh. Seems a bug with entry as you've concluded.









share|improve this question












share|improve this question




share|improve this question








edited May 31 at 17:48
























asked May 28 at 20:01









Tim

22.6k61222401




22.6k61222401











  • Comments are not for extended discussion; this conversation has been moved to chat.
    – terdon♦
    May 31 at 8:46










  • Moving the helpful comments into a chatroom, which will disappear eventually, is very unfortunate. I have to manually save some comments from the chatroom.
    – Tim
    May 31 at 17:47











  • If the comments are useful, they should be moved to the question or answer they are commenting upon. Comments are designed to be ephemeral and are not the place to have discussions.
    – terdon♦
    May 31 at 17:53











  • Yet I had to copy others' comments into my question. I am on the side with what this user said in his profile unix.stackexchange.com/users/21167/zwol on this matter
    – Tim
    May 31 at 18:00







  • 1




    The policy saying comments are not for extended discussion is an incorrect and harmful policy. The discussion of a question or answer belongs with the question or answer, i.e. in the comments. I have refused to cooperate with this policy for years and I advise you to do the same, Tim. @terdon
    – zwol
    Jun 1 at 0:37

















  • Comments are not for extended discussion; this conversation has been moved to chat.
    – terdon♦
    May 31 at 8:46










  • Moving the helpful comments into a chatroom, which will disappear eventually, is very unfortunate. I have to manually save some comments from the chatroom.
    – Tim
    May 31 at 17:47











  • If the comments are useful, they should be moved to the question or answer they are commenting upon. Comments are designed to be ephemeral and are not the place to have discussions.
    – terdon♦
    May 31 at 17:53











  • Yet I had to copy others' comments into my question. I am on the side with what this user said in his profile unix.stackexchange.com/users/21167/zwol on this matter
    – Tim
    May 31 at 18:00







  • 1




    The policy saying comments are not for extended discussion is an incorrect and harmful policy. The discussion of a question or answer belongs with the question or answer, i.e. in the comments. I have refused to cooperate with this policy for years and I advise you to do the same, Tim. @terdon
    – zwol
    Jun 1 at 0:37
















Comments are not for extended discussion; this conversation has been moved to chat.
– terdon♦
May 31 at 8:46




Comments are not for extended discussion; this conversation has been moved to chat.
– terdon♦
May 31 at 8:46












Moving the helpful comments into a chatroom, which will disappear eventually, is very unfortunate. I have to manually save some comments from the chatroom.
– Tim
May 31 at 17:47





Moving the helpful comments into a chatroom, which will disappear eventually, is very unfortunate. I have to manually save some comments from the chatroom.
– Tim
May 31 at 17:47













If the comments are useful, they should be moved to the question or answer they are commenting upon. Comments are designed to be ephemeral and are not the place to have discussions.
– terdon♦
May 31 at 17:53





If the comments are useful, they should be moved to the question or answer they are commenting upon. Comments are designed to be ephemeral and are not the place to have discussions.
– terdon♦
May 31 at 17:53













Yet I had to copy others' comments into my question. I am on the side with what this user said in his profile unix.stackexchange.com/users/21167/zwol on this matter
– Tim
May 31 at 18:00





Yet I had to copy others' comments into my question. I am on the side with what this user said in his profile unix.stackexchange.com/users/21167/zwol on this matter
– Tim
May 31 at 18:00





1




1




The policy saying comments are not for extended discussion is an incorrect and harmful policy. The discussion of a question or answer belongs with the question or answer, i.e. in the comments. I have refused to cooperate with this policy for years and I advise you to do the same, Tim. @terdon
– zwol
Jun 1 at 0:37





The policy saying comments are not for extended discussion is an incorrect and harmful policy. The discussion of a question or answer belongs with the question or answer, i.e. in the comments. I have refused to cooperate with this policy for years and I advise you to do the same, Tim. @terdon
– zwol
Jun 1 at 0:37
















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446545%2flogname-no-login-name%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446545%2flogname-no-login-name%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay