Tag Info

Hot answers tagged

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


5

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


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

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


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


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.


2

It's readable by remote_user and root. None other, unless remote_command is writing it to a globally readable file or something like that. You can inspect the environment of a process in the /proc filesystem in /proc/$pid/environ. You either need to be the same user as the euid of $pid or you need to be root, as the permissions of that file seem to default ...


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


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

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


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



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