Tag Info

New answers tagged

0

You can use standard ssh identities to do passwordless login. This is handled by default if you have a ~/.ssh/id_rsa or the like, but you can also hardcode your own path to the private key of an authroized keypair. This allows batching/scripting without exposing passwords, and the public key can be remove from the target server if the private key is ever ...


1

It depends on your systems cryptographic hash used to store the passwords. do sudo cat /etc/shadow and look for the username followed by $number$ $1$ means you are using MD5 $2$ or $2a$ means you are using blowfish $5$ means you are using SHA-256 $6$ means you are using SHA-512 for example, sha-512 would give you a 2^512 max length. sha-256, 2^256th. ...


6

You have the alias statement when you don't need it, what you're actually creating is a function, replace the word alias with function and it will work as expected. You also don't actually need function either, you could just have the following and it will work as expected; genpass() { gpg --gen-random 1 $1 | perl -ne' print "Your password: "; ...


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 ...


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, ...


0

First of all openssl command is usually not used to encrypt passwords. You can read about openssl at http://en.wikipedia.org/wiki/OpenSSL On Unix systems passwords are encrypted with a one way hash, so there is no way to decrypt them to get back the original. In one way encryption the salt is usually a pre determined string or generated from the plain ...


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


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.


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" ...


0

To expand on @slm's workarounds above, if you're worried about someone getting a hold of your bash history and seeing the plain text password, you can insert raw_input() in the python statement where the salt and password fields go so it prompts you for them. The text isn't masked while you're typing, but it won't show up in your bash history. You could also ...


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"


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.


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.


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 ...


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/ ...


0

add this to .emacs: ;; Do not use gpg agent when runing in terminal (defadvice epg--start (around advice-epg-disable-agent activate) (let ((agent (getenv "GPG_AGENT_INFO"))) (setenv "GPG_AGENT_INFO" nil) ad-do-it (setenv "GPG_AGENT_INFO" agent))) source: http://stackoverflow.com/a/16829842/3024945


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 ...


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.


0

Try this: https://help.ubuntu.com/community/LiveCdRecovery#Lost_Password To find the partition on which [L]ubuntu is installed, refer to the Finding your root partition section of the article. This requires you to still have the installation USB available. Where it says to use the passwd command use passwd <username> followed by the enter key and ...


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 ...


0

Its quite easy task you simply have to make some changes in /etc/passwd file. Simply you have to change the shell which is generally by default /bin/bash I.e you can login using this shell change it to /bin/nologin or /bin/false. It is advisable to change it to /bin/nologin because /bin/false is outdated.


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 ...


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 ...


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.


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 ...


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" ...


0

Not a full blown answer but if you look in the man page of ssh-agent it has the following paragraph. The agent initially does not have any private keys. Keys are added using ssh-add(1). When executed without arguments, ssh-add(1) adds the files ~/.ssh/id_rsa, ~/.ssh/id_dsa, ~/.ssh/id_ecdsa and ~/.ssh/identity. If the identity has a passphrase, ...


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 ...



Top 50 recent answers are included