Questions tagged [login]

Login, or logon, meaning to authenticate with a computer.

947 questions
192
votes
6 answers

how to disable SSH login with password for some users?

On Linux (Debian Squeeze) I would like to disable SSH login using password to some users (selected group or all users except root). But I do not want to disable login using certificate for them. edit: thanks a lot for detailed answer! For some…
Stepan
  • 2,139
  • 3
  • 15
  • 8
142
votes
4 answers

Is my password compromised because I forgot to hit Enter after ssh username?

I've just tried logging into a Fedora (release 13 Goddard) server using SSH (PuTTY, Windows). For some reason the Enter after typing my username didn't go through and I typed in my password and hit Enter again. I only realized my mistake when the…
Jonas Heidelberg
  • 1,184
  • 1
  • 7
  • 14
119
votes
12 answers

How can I automatically change directory on ssh login?

I'm trying to get ssh to automatically change to a particular directory when I log in. I tried to get that behaviour working using the following directives in ~/.ssh/config: Host example.net LocalCommand "cd web" but whenever I log in, I see the…
Gareth
  • 1,416
  • 2
  • 11
  • 12
114
votes
8 answers

How to run command as user who has /usr/sbin/nologin as Shell?

All I need to do is to run a specific script as a particular user who does have the nologin/false shell indicated in /etc/passwd. I would run the script as root and this should run as another user. Running: ~# su -c "/bin/touch /tmp/test"…
Tommaso
  • 1,161
  • 2
  • 8
  • 4
107
votes
21 answers

Login without running bash_profile or bashrc

So let's say one typoed something in their .bashrc that prevents him (or her) from logging in via ssh (i.e. the ssh login exits because of the error in the file). Is there any way that person could login without executing it (or .bashrc since the…
Tom Ritter
  • 3,197
  • 5
  • 27
  • 30
102
votes
11 answers

How to prevent a user from login in, but allow "su - user" in Linux?

How do you allow a user to log in using "su - user" but prevent the user from login in using SSH? I tried to set the shell to /bin/false but the when I try to su it doesn't work. Are there several ways to only allow logins by su? Is SSH's AllowUser…
NoozNooz42
  • 1,185
  • 2
  • 9
  • 9
96
votes
3 answers

How do I extract login history?

I need to know the login history for specific user (i.e. login and logout time), How do I extract this history for a specific date range in Linux ?
shox
  • 1,071
  • 1
  • 8
  • 7
95
votes
8 answers

How can I edit the welcome message when ssh start?

I have a VPS for my website hosting. It is running a Ubuntu server. Every time I logged in my server by ssh, it displays a lengthy welcome message in my terminal. Linux node61.buyvm.net 2.6.18-pony6-3 #1 SMP Tue Mar 13 07:31:44 PDT 2012…
Yansuck
74
votes
3 answers

What is the difference between /sbin/nologin and /bin/false?

I have often heard it recommended that a user account should be disabled by setting its shell to /bin/false. But, on my existing Linux systems, I see that a great number of existing accounts (all of them service accounts) have a shell of…
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
64
votes
2 answers

Executing a command as a nologin user

I've recently set up my server so that my suPHP 'virtual' users can't be logged into by using this article My issue now is that before when I ran a rake command for my Ruby on Rails application running on the server, I used su to go into www-data…
user82250
61
votes
9 answers

Tool to test a user account and password (test login)

Yeah, I can fire up a VM or remote into something and try the password...I know...but is there a tool or script that will simulate a login just enough to confirm or deny that the password is correct? Scenario: A server service account's password is…
TheCleaner
  • 32,627
  • 26
  • 132
  • 191
40
votes
7 answers

How do I disable root login in Ubuntu?

a while ago I gave root a password so I could log in as root and get some stuff done. Now I want to disable root login to tighten security, since I'm going to be exposing my serve to the internet. I've seen several ways of doing this (sudo passwd -l…
Ben Hymers
  • 703
  • 2
  • 8
  • 12
35
votes
2 answers

Is there a specific name for the ".\" (dot-slash) shorthand used to log onto a Windows machine?

I guess the title just about says it all. And yes, .\, not that obsolete \. thing. For those who don't know, .\ is a shorthand way of saying "this computer"*see "footnote" in Windows at a logon screen, which comes in very handy when you don't know…
HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
35
votes
1 answer

What's the meaning of logging in as "username@mydomain.com:something"

My Windows 2008 R2 machine is joined to a domain. In the logon screen, if I type in "username@mydomain.com:something" as the username, I can still logon properly, what's the meaning of ":something" appended at the end? I can even see the current…
Harvey Kwok
  • 796
  • 1
  • 6
  • 16
34
votes
5 answers

What's the default username and password for an Ubuntu Live CD?

What's the username and password for an Ubuntu Live CD image? I ask because I've recently copied the contents of an Ubuntu based live ISO (easypeasy, the ldistro for nwtbooks) onto a hard disk drive, but the Squashfs file system is corrupt, most…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
1
2 3
63 64