Tag Info

Hot answers tagged

6

Your local shell (probably bash) is expanding user@host:/home/user/something/{file1,folder1,folder2,folder3,folder4} into: user@host:/home/user/something/file1 user@host:/home/user/something/folder1 user@host:/home/user/something/folder2 user@host:/home/user/something/folder3 user@host:/home/user/something/folder4 Instead, you can do: scp -r -P PORT ...


5

This is a security feature It is set in /etc/login.defs on the line FAIL_DELAY N where N is the time in seconds to delay another attempt


5

This is a security feature and slows down an attacker who tries passwords.


4

This should work on just about any distro, I think. If you can access the root partition from another system, e.g. a live CD, you can as root from there edit /etc/shadow; first you have to chmod u+w shadow. Find the entry for root, it's probably the first one and looks something like this: root:$6$asdG0[..etc...]ae/:15666:0:99999:7::: Erase everything ...


4

Yes, it's normal. What happens is that your shell expands the braces before running the command so what you're actually running is scp -r -P PORT user@host:/home/user/something/file1 \ user@host:/home/user/something/folder1 \ user@host:/home/user/something/folder3 \ user@host:/home/user/something/folder4 ...


4

That is actually the md5-based hash for the empty password: $ mkpasswd -m md5 -S 9TGbA/j3 Password: $1$9TGbA/j3$qxBpCtr2C3VIKcwcvniQi1 $


2

Presumably you're using Ubuntu (or similar) with no root password. The easiest option would be to remove your user password, login with no password (easy!) and set a new one. Warning: Only do this if you're in a reasonably safe environment (PC/laptop in home or office) etc - don't do it on a Internet connected, ssh enabled server especially if the ...


2

Have a look at libpam-script. It allows you to execute scripts during authorization, password changes and sessions. To meet your need, you can build a PAM configuration (in /etc/pam.d/<whatever>) that arranges for this module to execute right before pam_deny only if the normal sequence of modules denies the login.


2

You fear of an update of shadow-utils is IMO unwarranted. The routines described in that HOWTO are available on my Ubuntu 12.04 and Mint 17 systems without installing anything special. The structure to read /etc/shadow information in a C program can be found in /usr/include/shadow.h and with man 5 shadow and the functions that you would need to find e.g. a ...


1

A better way to get local users might be to see if the user has a valid login shell: getent passwd | grep -f /etc/shells Here's something that should work: getent passwd | grep -f /etc/shells | tr ',' ':' | \ awk -F: '{print $1, $5}' | while read USER NAME do echo $NAME:$(chage -l $USER| awk -F': ' '/Password expires/{print $2}') ...


1

scp isn't very smart: when given multiple command line arguments that are files from the same remote host, it opens a new connection for each argument. You can use rsync instead of scp, it's smarter this way (and in other ways). rsync -r -e 'ssh -P PORT' user@host:/home/user/something/{file1,folder1,folder2,folder3,folder4} folder/folder2/ Another ...


1

I always used stty -echo to turn echoing off, then read and afterwards do stty echo (read more by viewing man of stty - i.e. man stty). This is more useful from a programmers perspective as you can turn echoing off and then read a password from a programming language such as Java, C(++), Python, etc. with their standard stdin "readers." In bash, the usage ...


1

As a minimum I would like to obtain hashes under MD5, SHA1, SHA256 See: man md5sum man sha1sum man sha256sum Beware of the presence of newlines when you use these!



Only top voted, non community-wiki answers of a minimum length are eligible