Tag Info

New answers tagged

3

Allowing a less trusted user to run apt-get update is ok. They worst they can do is consume a lot of bandwidth and fill up some disk space, and they have plenty of other means to do this unless you've taken stringent measures to prevent this. Allowing a user to run apt-get upgrade is likely to give them root access. Some packages query the user and might ...


1

If you want to start mysql with a password provided you have to fetch the password in a variable first: MYSQLPASS=`cat foo.php | grep '$dbpwd=' | cut -d '"' -f 2` Then you can start your mysql command with: mysql -U root -p ${MYSQLPASS} mydb -h friendserver


3

You have to be very careful how you pass passwords to command lines as, if you're not careful, you'll end up leaving it open to sniffing using tools such as ps. The safest way to do this would be to create a new config file and pass it to mysql using either the --defaults-file= or --defaults-extra-file= command line option. The difference between the two ...


0

Your script will have to be able to access the password. You can't use a hash of the password: if you did, the hash would be the password, since that would mean anyone with the hash could log in. You should put the password in a separate file, and read it from your script. Take care to reproduce the password exactly (for example, don't use echo -e "$PASS" ...


0

To expand upon @Gilles answer. Some sites I've encountered, won't save passwords because the user and password fields are not enclosed in a form. I've created this userscript to handle such cases: https://github.com/JavierParra/userscripts/blob/master/forceRememberPassword.user.js


5

You realy should'nt do this. In case you enter your password with just 1 char wrong, everyone who has access to that list/logfile can guess your password. Log who and when someone failed to authenticate. What your trying to achieve is a security risk.


4

First, your immediate syntax error: "$ line" is the 6-character string dollar, space, l, i, n, e. To take the value of the variable line, use "$line". Note that if the value is -e or -E, echo will parse it as an option and print nothing. To avoid this, use printf %s instead. Also, plain read strips whitespace at the beginning and end of the line and treats ...


-1

EDIT Instead of sha256sum, it's far better to use something more robust. (Hat tip: user Gilles). The glibc crypt routine iterates the salted string through sha256 for a minimum of 5000 rounds. The idea is this makes password crackers require many more resources / time to find a matching string. You can use this technique on pretty much any system by ...


0

Use the passwd command and enter a password when prompted. Do the same as root to set a password for the root account — it's useless to have a password on some user account if you don't have one for root. Note that you type the password when you log in, not when you open a new terminal window. It would be completely useless to require a password to open a ...


0

with hscroot you can do a: chhmcusr -u root -t passwd and thus you will now know (change) the root password, log in with root, cat the /etc/shadow. Then if needed, restore the old shadow file from backup, so the root pw will be unchanged, but you will still have a root terminal to cat. But I didn't tested this yet. Usually "PermitRootLogin no" is in ...


7

You submit a support call to IBM who then give you the hscpe user password, which is good for one day. That user ID and password allows you to gain access to root (assuming you recorded the root password when you installed the HMC). Then you can cat /etc/shadow. You can't do it without root access (by design), and you can't simply switch to root either ...


2

A HMC is a blackbox solution from IBM. You aren't supposed to have root access. It is possible to request a tempoary password from IBM that provide root access.


1

As a comment says, you don't cat /etc/shadow unless you already have root permissions. That's how the system is designed - that's how UNIX and Linux system have been designed since at least the 1990's if not before (pre-1992 is before my time, so I can't speak with authority).


0

As the error message states, your installation is missing a file (or a whole package). The following lines will sort it out. ls -l /usr/lib/mps/libnspr4.so grep libnspr4.so /var/sadm/install/contents pkgchk SUNWpr If SUNWpr is not installed, you need to add it with running pkgadd -d . SUNWpr from an installation media directory.


0

I must first mention that I am absolutely no specialist in security. For the python part, It seems like wrapping mlock into python is not difficult using ctypes. From the limits and permissions section of the man for mlock, it seems that a regular user can lock a limited amount of memory. Running uname -a on my system gives me max locked memory (kbytes, ...


3

On Linux use mlock http://linux.die.net/man/2/mlock mlock() and mlockall() respectively lock part or all of the calling process's virtual address space into RAM, preventing that memory from being paged to the swap area. The man page has more details.


0

A password agent (also known as a keychain/keyring or secrets store) is the tool for this. The idea is to keep all your passwords in an encrypted database protected by a master password. The agent starts when you log in, gets the master password from you, then decrypts individual passwords for other programs on request. Often the master password will be ...


0

I have think that you can use scp command You should create a ssh key. How to generate a key Now, you can copy the files in other server. scp file user@server.com:/path/ I hope that it work


2

By design ssh doesn't allow 'embedding' of passwords - that's because it has a mechanism for non-interactive auth using public-private key pairs. So I would suggest you consider that as your first port of call. Usually it's as simple as: run ssh-keygen on your client. add the id_rsa.pub to ~/.ssh/authorized_keys on your server. If that's not an ...


0

Boot from the installation media and then mount the disk and edit /etc/passwd, /etc/shadow if needed. If you don't have the media, try to connect the disk to another system which can mount an old sysv-ufs in rw mode.


1

On Ubuntu 12.04, there is mkpasswd (from the whois package): Overfeatured front end to crypt(3) mkpasswd -m sha-512 -s <<< YourPass Where: -m = Compute the password using the TYPE method. If TYPE is help then the available methods are printed. E.g. mkpasswd -m help -s = Read password from stdin



Top 50 recent answers are included