Questions regarding password-based authentication and password management

learn more… | top users | synonyms (1)

44
votes
2answers
11k views

Why is there a big delay after entering a wrong password?

I notice a weird (well, according to me) thing about passwords. For example, if I type an incorrect password during login, there will be a few seconds' delay before the system tells me so. When I try ...
7
votes
3answers
24k views

Shell Script for logging into a ssh server

I tried writing a shell script which can do automatic login into a ssh server using password which is mentioned in the script. I have written the following code: set timeout 30 /usr/bin/ssh -p 8484 ...
18
votes
4answers
23k views

How to create SHA512 password hashes on command line

In Linux I can create a SHA1 password hash using sha1pass mypassword. Is there a similar command line tool which lets me create sha512 hashes? Same question for Bcrypt and PBKDF2.
5
votes
1answer
281 views

Automated ssh login with passphrase?

Logging onto a machine over ssh typically requires a password to be entered before access is granted. Alternatively, a key/certificate (without a passphrase) can be installed onto the remote machine ...
28
votes
4answers
28k views

Disable a user's login without disabling the account

Let's say I create a user named "bogus" using the adduser command. How can I make sure this user will NOT be a viable login option, without disabling the account. In short, I want the account to be ...
15
votes
4answers
2k views

How to make user passwords shown as a clear text in Linux?

We know that users' passwords are saved in /etc/passwd, but in an encrypted way, so even the root can't see them: jane:x:501:501::/home/jane:/bin/bash fred:x:502:502::/home/fred:/bin/bash As shown ...
13
votes
6answers
2k views

Is there a root password on OS X and Ubuntu?

When you setup a new Ubuntu or OS X installation a user is generally created for you. On OS X it is whatever username you pick. On Ubuntu (the server version) usually the ubuntu user is created. The ...
10
votes
3answers
2k views

How do I log into my Linux laptop if I have forgotten both the login and password?

How do I log into my Linux laptop if I have forgotten both the username and password?
9
votes
1answer
12k views

Manually generate password for /etc/shadow [duplicate]

I need to manually edit /etc/shadow to change the root password inside of a virtual machine image. Is there a command-line tool that takes a password and generates an /etc/shadow compatiable password ...
6
votes
3answers
11k views

How to get back sudo on Ubuntu?

I have done this: sudo chown -R myname /usr/ and now I can't use the sudo command because of this error: sudo: must be setuid root And as I read this means that the owner of this file ...
3
votes
4answers
1k views

passing passwords to a script

I want to scp a file to a remote host, and from there, run a command on the file, and exit the remote session. If I write a usual script, call scp and then ssh, I am prompted to enter two passwords. ...
14
votes
4answers
448 views

What specific vulnerabilities am I creating by disabling the sudo password?

Here are some instructions on how to disable your sudo password. These carry the following warning If you disable the sudo password for your account, you will seriously compromise the security of ...
2
votes
1answer
3k views

How to enter/choose session after logout without password in (Linux Mint) Xfce?

I have Linux Mint 14 Xfce (4.10) and have also installed LXDE desktop, so I can choose between these sessions if I want. Normally I would set one as default and at startup I am not asked for ...
0
votes
2answers
117 views

Resetting password of another Linux [duplicate]

I have an external hdd partitioned into two. One of the partitions has Linux (Ubuntu) installed on it (bootable). The thing is I have forgotten the password of it's user (single user). How can I ...
6
votes
2answers
3k views

Reading passwords without showing on screen in Bash Scripts

How to read passwords in bash scripts in a way like tools which are not showing it on terminal ? (Changing font to black on black might be tricky by easy to copy&paste - so it's not solution)
2
votes
1answer
13k views

How to lock users after 5 unsuccessful login tries?

How to lock users after 5 unsuccessful login tries? I gathered a few distributions/versions to how to do it, but I can't test it. RHEL4: by adding the: auth required ...
2
votes
1answer
589 views

wpa_supplicant store password as hash (WPA-EAP with phase2=“auth=PAP”)

Is there a way to store my password in /etc/wpa_supplicant/wpa_supplicant.conf as some hash instead of plaintext? By "password" I refer here to the password used for phase2 authentification. I do not ...
1
vote
2answers
125 views

can you only input the password once and then execute the su command without entering a password? [duplicate]

I am copying files from a remote server to my local server. Here is the code that does this: sshpass -p "password" ssh -q username@$192.168.162.156 "mkdir -p /temp ; ...
6
votes
3answers
44k views

How can we change root password?

If we don't know the root password and don't have root access to the machine, how can we change the root password?
26
votes
3answers
2k views

Why shouldn't someone use passwords in the command line?

Why do people fear writing passwords in the command line? The history file is located in ~/.history, so it's available only to the user who executed the commands (and root).
1
vote
1answer
1k views

How to reset Linux root and grub passwords?

If we forget our Linux root password, we can change it by changing grub's boot options. But in this case, we also set a grub password and forgot both passwords. How can we recover both?
10
votes
4answers
19k views

How to check password with Linux?

I want to check, from the linux command line, if a given cleartext password is the same of a crypted password on a /etc/shadow (I need this to authenticate web users. I'm running an embedded linux.) ...
9
votes
1answer
4k views

What methods are used to encrypt passwords in /etc/passwd and /etc/shadow?

A careful examination of the /etc/passwd and /etc/shadow files reveal that the passwords stored are hashed using some form of hashing function. A quick Google search reveals that by default, the ...
20
votes
6answers
12k views

How do you create a user with no password?

In os X it's possible to have users without passwords. If you inspect them with dscl their password show up as *. This is used for system users such as users for databases like mysql, pgsql etc. ...
8
votes
3answers
7k views

Safe way to pass password for >1 programs in bash

I'm writing a bash script, and need to ask user for his password and pass it to openssl. Whilst openssl can read the password itself, I need for two runs of the program and don't want to ask the user ...
7
votes
2answers
5k views

Why is sudo telling me my password is wrong?

I recently installed OpenBSD 4.9 in my computer, so I could learn a little bit about Unix-like operating systems. I added a new user to the system called bruno. Ok. When I use the 'sudo' command, it ...
5
votes
3answers
1k views

Why is the 'sudo' password different than the 'su root' password

On my personal machine, I often type sudo in front of certain commands in order to accomplish administrative tasks. I had hoped to avoid doing this throughout the day, by typing su root and providing ...
5
votes
1answer
1k views

Changing password in multiple boxes using script

I'm working in a environment which has around 400 AIX boxes. I don't have root access and I'm a normal user. The environment has no LDAP kind of centralized mechanism for authentication so the ...
4
votes
2answers
768 views

Two ways to lock a password but only one to unlock

CentOS 6 Linux has two ways to lock a password: passwd -l usermod -L Today I found out, that they do something different. passwd writes two exclamation marks into the shadow file. # passwd -d ...
3
votes
1answer
65 views

How to use my login password to do two things

I have a CIFS drive that I mount regularly, and it requires a password for it. Since it's annoying to type my password every time, I wrote a script that sets the PASSWD environment variable, mounts ...
3
votes
1answer
2k views

Can I automate mounting a cifs share without storing my password in plaintext?

I currently use a script which contains commands along the lines of sudo /sbin/mount.cifs $SERVER_SHARE $MOUNT -o username=$DOMAIN_$USER,uid=$USER,gid=$USER,file_mode=0664,dir_mode=0775 to mount my ...
2
votes
1answer
520 views

How to password-less log on via ssh alias

Suppose I have access to pc via a server. I can directly log-on to pc by using How do I connect to a pc through another pc using ssh Such that my .ssh/config looks like: Host short Hostname pc User ...
6
votes
2answers
913 views

Pipe Password to Application When Asked

The following should be done in a bash script: curl --digest --user schmijos https://bitbucket.org/u/p/get/tip.zip -o tip.zip How can I automatically submit a password to curl when it asks for it? ...
4
votes
3answers
1k views

Stracing su and ssh shows the password. Is this a security flaw or am I missing something?

I'm currently fascinated by strace so, being new to it, I decided to play around a little. As suggested by the question title, I tried both strace su and strace ssh. Both commands displayed the ...
4
votes
2answers
2k views

/etc/shadow date of last password change—UTC or local time?

man 5 shadow gives the following description of the third field in each line: The date of the last password change, expressed as the number of days since Jan 1, 1970. The value 0 has a ...
3
votes
3answers
394 views

Securely feeding a program with a password

After understanding the problem with using a password in the command line, I need to find a way of feeding a program with a password without it being a problem (without the password being recorded ...
3
votes
1answer
712 views

Change default for Nautilus (file_manager) from “Forget password immediately”?

When opening a tab which needs to mount a Samba share, Nautilus 2.30.1 displays a window: Password required for share xxx on localhost Password: [ ] (*) Forget password immediately ( ) ...
2
votes
2answers
120 views

Will I be prompted for the sudo password a second time?

This is what I plan to do: #!/bin/bash sudo -i <<'EOF' iptables-save | awk '/^[*]/ { print $1 } /^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; } /COMMIT/ { print $0; ...
2
votes
1answer
851 views

Does OpenBSD use bcrypt by default?

http://codahale.com/how-to-safely-store-a-password/ with what does OpenBSD store the password by default? They say bcrypt is way more secure then hashing. I googled' it and obsd supports bcrypt, but ...
1
vote
1answer
67 views

How to check my account on embedded linux without “/etc/passwd”?

On some embedded linux systems, there is no /etc/passwd file and /etc directory is not writable (which means I cannot set user account and password?). Then what is my (default) account name and ...
1
vote
1answer
272 views

Linux can't recognize the right password when ssh'ing?

I've created a local port forwarding and I was trying to ssh into my own port. During the process, I found that my own Linux won't recognize me even when I have the right password ...
1
vote
0answers
16 views

How to ask for a password to mount crypted swap at boot time on Linux Mint 16 with initramfs-tools? [duplicate]

I use encrypted home folders on my notebook, which prevents use of hibernation on standard setup, because - and for a good reason - besides encrypting the home folder with ecryptfs, it reformats the ...
1
vote
2answers
936 views

Edit home directory for an LDAP user in Linux

I have an LDAP user who accesses a server based on having the appropriate LDAP host attribute via sssd. This user does not show up in /etc/passwd because he is not local. How do I modify his home ...