New answers tagged

0

Provided that your smb.conf contains passdb backend = tdbsam you can export a file with encrypted passwords, on a system that was already setup, using: sudo pdbedit -e smbpasswd:/tmp/smbpasswd Then, in order to setup a new system, you can import it using sudo pdbedit -i smbpasswd:/tmp/smbpasswd -e tdbsam:/var/lib/samba/private/passdb.tdb (/var/lib/...


0

I have two aliases added to my .zshrc.local file to create strong passwords. The first is: alias pw.graph="cat /dev/urandom | tr -dc '[:graph:]' | fold -w 1000 | perl -pe 's/(.)(?=.*?\1)//g' | head -n 5" The output of typing pw.graph is five lines of every character that can be typed on a keyboard with the exception of the space bar: /d=|&mRq!g$...


1

Let me explain this to you The differnce is that linux has two ways to lock an user's login : 1- by locking the password 2- by locking the username First: passwd -l test < this will lock the password for user. passwd -u test < the locked password can only be unlocked by this, means only then user can login. Second: ...


0

create exampleuser , and set password to it then change firefox permissions to 700 and change firefore own to exampleruser ; after this you can run firefox only root or exampleuser with sudo or su command. for exmaple: sudo useradd exampleuser sudo passwd exampleuser sudo chown exampleuser:exampleuser ../firefox sudo chmod 700 ../firefox test: $ ../...


1

Condition: installer - ls . | grep example.runchmod +x pelda.run else wget download/link/of/example.run As I understand the above, it translates to: if [ -f example.run ] then chmod +x pelda.run else wget download/link/of/example.run fi [ -f example.run ] is an example of using the test command. If a file named example.run exists, then the ...


0

I have not been able to identify the cause of this problem, but here is a solution: Simply clone the repository to a new copy: git clone old-repo new-repo cd old-repo git remote get-url origin # Copy this URL cd ../new-repo git remote set-url [paste URL from old-repo] That is, I simple clone a new copy of the repository and give its 'origin' remote the ...


1

In the script I had to pass it the -t flag to force tty allocation: spawn ssh -t <server> su - It now works as expected.


0

Even though this can only be done with root privilege, but it's still very dangerous: you use ssh from that machine to access other critical machines, then a malicious person with root privilege steal your password or pass phrase without you knowing it.


4

pass uses gpg to encrypt your passwords. This means you can use gpg-agent to cache your passphrase, thereby allowing the gpg tools and therefore pass to decrypt its files without asking for your passphrase again. If you're using GnuPG >= 2.1.0, gpg-agent will be started automatically. If not, there are (unfortunately) numerous ways to have gpg-agent start ...


0

Yet another method to generate passwords, is using the openssl tool. Generate MD5 passwords openssl passwd -1 -salt SaltSalt SecretPassword # output: $1$SaltSalt$FSYmvnuDuSP883uWgYBXW/ Generate DES passwords openssl passwd -crypt -salt XR SuprScrt # output: XR1dOp2EVMph2


2

The way I handle the same requirement is similar as what Mike wrote about Michael: ~/bin/sshmyvps #!/bin/bash if ! ssh-add -l|grep -q vpsaccess then ssh-add -t 2h ~/ssh-keys/vpsaccess.key fi ssh myuser@myserver.mydomain.net The main difference being that I don't look for just any loaded keys but only for a specific one and then leaving it valid for ...



Top 50 recent answers are included