Tag Info

Hot answers tagged

7

I would create a separate specific passwordless SSH key for this purpose. On the server side, you can set limits to what that key can be used for and where it can connect from, so that even if someone gets hold of the key, they would still not be able to use it to do something malicious. The way to limit the key is to edit the authorized_keys file on the ...


4

You can use SSH keys which have no passphrase. If you don't like that idea then you can create a key file without passphrase and put it into a RAM disk. Thus after a reboot you would have to log in manually in order to prepare the system for batch SSH usage by entering the passphrase and providing the new file. In the ssh calls you would have to provide ...


3

First step is to generate a private-public key pair on the machine you copy from: ssh-keygen You can go with the defaults, and make sure you don't provide a password for usage. This can take a bit of time. Second step, after the key generation has finished, is to copy the public key to the server using: ssh-copy-id username@server with the appropriate ...


3

You can do this if you are running gpg-agent (and your passphrase is loaded), by looping through the files in your password store and writing them to a separate file. You do have to strip the leading directories from the path ($PASSWORD_STORE_DIR) and the .gpg extension from each of the files in the subdirectories, but otherwise it is straightforward ...


3

As root you can change any users password by using the "passwd" command followed by the username; passwd username This will then prompt you to enter the new password twice. To clarify there is no way to see an existing users password.


3

Try: Defaults timestamp_timeout=0 An example from man 5 sudoers, where a value is appended to an option: Defaults env_keep += "DISPLAY HOME"


3

You can't execute /bin/bash in your chroot and that is most likely because your filesystem is mount with the noexec option and maybe also with nosuid. You can check this running with the mount command as that will show the mount options and you may need to remount the filesystem with other options.


3

Well, some info found in my logs: $ sudo tail -f /var/log/auth.log Dec 1 16:17:14 server sshd[31251]: User logcoll not allowed because account is locked I removed ! in the shadow entry and replaced it with: logcoll:NOPASSAUTHALLOWED:16384:0:99999:7::: man shadow states: If the password field contains some string that is not a valid result ...


2

I have seen that application do that as well. I think it is a result of the bash script (that is the pass program) not catching some errors. For me it was reason not to start using the program for real. If you can live with the plain text files being stored locally, you can prevent them from being stored in git (and pushed out to github) by setting up a ...


2

Your tmux session was started before your ssh agent was started, so the SSH_AUTH_SOCK and SSH_AGENT_PID variables are not set inside it. There are two ways to solve this. You can either copy those variables into the tmux session or run ssh-agent inside tmux to get them set, then run ssh-add to add the key to your ssh agent.


2

Chroot in ubuntu or recovering Ubuntu,Debian Linux boot from livecd of ubuntu, if you installed with system 32bit use 32bit Live CD, If 64bit use 64 bit live cd. Mount the Linux Partitions using # sudo blkid Output: sysadmin@localhost:~$ sudo blkid [sudo] password for sysadmin: /dev/sda1: UUID="846589d1-af7a-498f-91de-9da0b18eb54b" TYPE="ext4" ...


1

As PM 2Ring already indicated the noise indicates a hardrive problem and this would also explain why the system is no longer able to boot from the drive. You should IMO no longer try to boot from the drive, but build it into an external USB enclosure. Then boot from Live CD (or USB), and when it is up and running connected the (now external) HD and try and ...


1

openssl crypt you password with an algorithm and a salt. If you do not provided a salt an random is choosen. the salt is given in the resulting hash. for instance openssl passwd -1 foo $1$pyuddMjp$3.deTnHdrVVVLoh5zkQ0B. where 1 is proticol (md5 here) pyuddMjp is salt If I want to verif you know passwd (i.e. foo), I need to compare resulting hash, ...


1

(this does not answer the chroot, but can allow you to change a forgotten unix passwd) I understood disk is mounted on /media/usb try cd /media/usb/etc vi shadow pick line with root, wipe second field (or you can pick the crypted string of a know password from your actual /etc/shadow). in case shadow don't exists, do the same in passwd


1

You may want to look at the answers to a similar question on the Superuser SE site, Can I re-attach SSH key forwarding through a disconnected Screen session. The answers are likely the same.


1

Your theory sounds right to me. Each time through the for loop when you invoke rsync, it's reconnecting to the server and causing you to be re-prompted. Rather than loop through the file, ~/list using for you could give this list directly to rsync using the --files-from= switch. Example $ rsync --partial -z --files-from=/some/list server:/some/location/ ...


1

I believe these are the defaults: username: lubuntu password: blank (no password) That's literally nothing, for the password. Linux Format magazine If you're using the compilation CD/DVD that comes with this magazine the username should be "ubuntu" with again a blank password. Ubuntu 14.04 compilation disc References What is the default ...


1

Take a look at the keychain package. I'm not sure if it will do what you want, but it does cache the keys in memory in some fashion. And it does not require X to work.


1

This is too complicated for sudoers. You have to write a script which checks whether the user belongs to this group and calls passwd if so. sudoers must then be configured so that john can run this script as root. Of course, the path to this script must be writable only for root. #! /bin/bash group="groupname" test $# -ne 1 && exit 2 user="$1" ...


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

getent will return whatever the results are for whichever "database" you specify. It determines what backends to use when constructing this "database" based on the contents of /etc/nsswitch.conf. getent lists its "databases" when you query its usage page, getent --help. Supported databases: ahosts ahostsv4 ahostsv6 aliases ethers group gshadow hosts ...



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