What is logging in?












1














From https://unix.stackexchange.com/a/489913/674




Logging in is a user-space construct; the kernel doesn’t care about that.



There are multiple examples of this; for example, cron jobs can run as any user, without that user being logged in. ... connecting using SSH counts as logging in.




Since there are examples which have and which don't have logging in, may I ask what logging in is? What activities counts as logging in and what not?



Let me guess. Is any activity involving asking for user name and its password, and checking that information in /etc/passwd and /etc/shadow counted as logging in? Otherwise, not logging in?



Is running su logging in?



Is running sudo logging in? Or not, because it doesn't ask for the target user's password?



What are some other educational examples?



Thanks.










share|improve this question
























  • From Wikipedia: 'In computer security, logging in (or logging on or signing in or signing on) is the process by which an individual gains access to a computer system by identifying and authenticating themselves. '
    – Haxiel
    Dec 20 '18 at 13:12










  • As my understanding, logging in means that the kernel will handle a process, which creates a TTY. The TTY allows user to communicate with the OS through some kind of shell, such as bash, csh, zsh etc.
    – Yves
    Dec 20 '18 at 13:13










  • @arochester comments should only be used to ask for clarification. Please don't leave useless comments.
    – terdon
    Dec 20 '18 at 15:12
















1














From https://unix.stackexchange.com/a/489913/674




Logging in is a user-space construct; the kernel doesn’t care about that.



There are multiple examples of this; for example, cron jobs can run as any user, without that user being logged in. ... connecting using SSH counts as logging in.




Since there are examples which have and which don't have logging in, may I ask what logging in is? What activities counts as logging in and what not?



Let me guess. Is any activity involving asking for user name and its password, and checking that information in /etc/passwd and /etc/shadow counted as logging in? Otherwise, not logging in?



Is running su logging in?



Is running sudo logging in? Or not, because it doesn't ask for the target user's password?



What are some other educational examples?



Thanks.










share|improve this question
























  • From Wikipedia: 'In computer security, logging in (or logging on or signing in or signing on) is the process by which an individual gains access to a computer system by identifying and authenticating themselves. '
    – Haxiel
    Dec 20 '18 at 13:12










  • As my understanding, logging in means that the kernel will handle a process, which creates a TTY. The TTY allows user to communicate with the OS through some kind of shell, such as bash, csh, zsh etc.
    – Yves
    Dec 20 '18 at 13:13










  • @arochester comments should only be used to ask for clarification. Please don't leave useless comments.
    – terdon
    Dec 20 '18 at 15:12














1












1








1







From https://unix.stackexchange.com/a/489913/674




Logging in is a user-space construct; the kernel doesn’t care about that.



There are multiple examples of this; for example, cron jobs can run as any user, without that user being logged in. ... connecting using SSH counts as logging in.




Since there are examples which have and which don't have logging in, may I ask what logging in is? What activities counts as logging in and what not?



Let me guess. Is any activity involving asking for user name and its password, and checking that information in /etc/passwd and /etc/shadow counted as logging in? Otherwise, not logging in?



Is running su logging in?



Is running sudo logging in? Or not, because it doesn't ask for the target user's password?



What are some other educational examples?



Thanks.










share|improve this question















From https://unix.stackexchange.com/a/489913/674




Logging in is a user-space construct; the kernel doesn’t care about that.



There are multiple examples of this; for example, cron jobs can run as any user, without that user being logged in. ... connecting using SSH counts as logging in.




Since there are examples which have and which don't have logging in, may I ask what logging in is? What activities counts as logging in and what not?



Let me guess. Is any activity involving asking for user name and its password, and checking that information in /etc/passwd and /etc/shadow counted as logging in? Otherwise, not logging in?



Is running su logging in?



Is running sudo logging in? Or not, because it doesn't ask for the target user's password?



What are some other educational examples?



Thanks.







ssh sudo cron login su






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 20 '18 at 13:18

























asked Dec 20 '18 at 13:06









Tim

26.1k74246455




26.1k74246455












  • From Wikipedia: 'In computer security, logging in (or logging on or signing in or signing on) is the process by which an individual gains access to a computer system by identifying and authenticating themselves. '
    – Haxiel
    Dec 20 '18 at 13:12










  • As my understanding, logging in means that the kernel will handle a process, which creates a TTY. The TTY allows user to communicate with the OS through some kind of shell, such as bash, csh, zsh etc.
    – Yves
    Dec 20 '18 at 13:13










  • @arochester comments should only be used to ask for clarification. Please don't leave useless comments.
    – terdon
    Dec 20 '18 at 15:12


















  • From Wikipedia: 'In computer security, logging in (or logging on or signing in or signing on) is the process by which an individual gains access to a computer system by identifying and authenticating themselves. '
    – Haxiel
    Dec 20 '18 at 13:12










  • As my understanding, logging in means that the kernel will handle a process, which creates a TTY. The TTY allows user to communicate with the OS through some kind of shell, such as bash, csh, zsh etc.
    – Yves
    Dec 20 '18 at 13:13










  • @arochester comments should only be used to ask for clarification. Please don't leave useless comments.
    – terdon
    Dec 20 '18 at 15:12
















From Wikipedia: 'In computer security, logging in (or logging on or signing in or signing on) is the process by which an individual gains access to a computer system by identifying and authenticating themselves. '
– Haxiel
Dec 20 '18 at 13:12




From Wikipedia: 'In computer security, logging in (or logging on or signing in or signing on) is the process by which an individual gains access to a computer system by identifying and authenticating themselves. '
– Haxiel
Dec 20 '18 at 13:12












As my understanding, logging in means that the kernel will handle a process, which creates a TTY. The TTY allows user to communicate with the OS through some kind of shell, such as bash, csh, zsh etc.
– Yves
Dec 20 '18 at 13:13




As my understanding, logging in means that the kernel will handle a process, which creates a TTY. The TTY allows user to communicate with the OS through some kind of shell, such as bash, csh, zsh etc.
– Yves
Dec 20 '18 at 13:13












@arochester comments should only be used to ask for clarification. Please don't leave useless comments.
– terdon
Dec 20 '18 at 15:12




@arochester comments should only be used to ask for clarification. Please don't leave useless comments.
– terdon
Dec 20 '18 at 15:12










1 Answer
1






active

oldest

votes


















5














At the most basic level, it can be considered "authenticating to a service to obtain resources from that service".



But, in Unix, the term isn't so strictly defined. Different services can interpret in different ways.



Where terminology gets confused is when you think of "logging into Unix" and getting a "login session", rather than "accessing a service".



So, for example, ssh remotemachine is considered logging in, but ssh remotemachine cat /etc/passwd may not be (sshd will perform different actions, log different data, update different files); they're both authenticating to a service and getting resources... but the second version is not considered a "login session".



Also note that authentication need not be using the passwd and shadow files (e.g. an FTP server could use a different authentication database, or SSH public keys may be used, or a kerberos ticket, or...).






share|improve this answer





















  • Is it safe to say that "logging in" == "starting a login shell"? Or can you log in without starting a shell?
    – terdon
    Dec 20 '18 at 15:13










  • @terdon FTP, IMAP and other services may have a login process, but don't provide a shell. Conversely, ssh host /bin/sh -i will provide a prompt, but not a login session.
    – Stephen Harris
    Dec 20 '18 at 22:14













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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
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%2f490121%2fwhat-is-logging-in%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









5














At the most basic level, it can be considered "authenticating to a service to obtain resources from that service".



But, in Unix, the term isn't so strictly defined. Different services can interpret in different ways.



Where terminology gets confused is when you think of "logging into Unix" and getting a "login session", rather than "accessing a service".



So, for example, ssh remotemachine is considered logging in, but ssh remotemachine cat /etc/passwd may not be (sshd will perform different actions, log different data, update different files); they're both authenticating to a service and getting resources... but the second version is not considered a "login session".



Also note that authentication need not be using the passwd and shadow files (e.g. an FTP server could use a different authentication database, or SSH public keys may be used, or a kerberos ticket, or...).






share|improve this answer





















  • Is it safe to say that "logging in" == "starting a login shell"? Or can you log in without starting a shell?
    – terdon
    Dec 20 '18 at 15:13










  • @terdon FTP, IMAP and other services may have a login process, but don't provide a shell. Conversely, ssh host /bin/sh -i will provide a prompt, but not a login session.
    – Stephen Harris
    Dec 20 '18 at 22:14


















5














At the most basic level, it can be considered "authenticating to a service to obtain resources from that service".



But, in Unix, the term isn't so strictly defined. Different services can interpret in different ways.



Where terminology gets confused is when you think of "logging into Unix" and getting a "login session", rather than "accessing a service".



So, for example, ssh remotemachine is considered logging in, but ssh remotemachine cat /etc/passwd may not be (sshd will perform different actions, log different data, update different files); they're both authenticating to a service and getting resources... but the second version is not considered a "login session".



Also note that authentication need not be using the passwd and shadow files (e.g. an FTP server could use a different authentication database, or SSH public keys may be used, or a kerberos ticket, or...).






share|improve this answer





















  • Is it safe to say that "logging in" == "starting a login shell"? Or can you log in without starting a shell?
    – terdon
    Dec 20 '18 at 15:13










  • @terdon FTP, IMAP and other services may have a login process, but don't provide a shell. Conversely, ssh host /bin/sh -i will provide a prompt, but not a login session.
    – Stephen Harris
    Dec 20 '18 at 22:14
















5












5








5






At the most basic level, it can be considered "authenticating to a service to obtain resources from that service".



But, in Unix, the term isn't so strictly defined. Different services can interpret in different ways.



Where terminology gets confused is when you think of "logging into Unix" and getting a "login session", rather than "accessing a service".



So, for example, ssh remotemachine is considered logging in, but ssh remotemachine cat /etc/passwd may not be (sshd will perform different actions, log different data, update different files); they're both authenticating to a service and getting resources... but the second version is not considered a "login session".



Also note that authentication need not be using the passwd and shadow files (e.g. an FTP server could use a different authentication database, or SSH public keys may be used, or a kerberos ticket, or...).






share|improve this answer












At the most basic level, it can be considered "authenticating to a service to obtain resources from that service".



But, in Unix, the term isn't so strictly defined. Different services can interpret in different ways.



Where terminology gets confused is when you think of "logging into Unix" and getting a "login session", rather than "accessing a service".



So, for example, ssh remotemachine is considered logging in, but ssh remotemachine cat /etc/passwd may not be (sshd will perform different actions, log different data, update different files); they're both authenticating to a service and getting resources... but the second version is not considered a "login session".



Also note that authentication need not be using the passwd and shadow files (e.g. an FTP server could use a different authentication database, or SSH public keys may be used, or a kerberos ticket, or...).







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 20 '18 at 14:27









Stephen Harris

25.1k24477




25.1k24477












  • Is it safe to say that "logging in" == "starting a login shell"? Or can you log in without starting a shell?
    – terdon
    Dec 20 '18 at 15:13










  • @terdon FTP, IMAP and other services may have a login process, but don't provide a shell. Conversely, ssh host /bin/sh -i will provide a prompt, but not a login session.
    – Stephen Harris
    Dec 20 '18 at 22:14




















  • Is it safe to say that "logging in" == "starting a login shell"? Or can you log in without starting a shell?
    – terdon
    Dec 20 '18 at 15:13










  • @terdon FTP, IMAP and other services may have a login process, but don't provide a shell. Conversely, ssh host /bin/sh -i will provide a prompt, but not a login session.
    – Stephen Harris
    Dec 20 '18 at 22:14


















Is it safe to say that "logging in" == "starting a login shell"? Or can you log in without starting a shell?
– terdon
Dec 20 '18 at 15:13




Is it safe to say that "logging in" == "starting a login shell"? Or can you log in without starting a shell?
– terdon
Dec 20 '18 at 15:13












@terdon FTP, IMAP and other services may have a login process, but don't provide a shell. Conversely, ssh host /bin/sh -i will provide a prompt, but not a login session.
– Stephen Harris
Dec 20 '18 at 22:14






@terdon FTP, IMAP and other services may have a login process, but don't provide a shell. Conversely, ssh host /bin/sh -i will provide a prompt, but not a login session.
– Stephen Harris
Dec 20 '18 at 22:14




















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f490121%2fwhat-is-logging-in%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

List directoties down one level, excluding some named directories and files

list processes belonging to a network namespace

list systemd RuntimeDirectory mounts