Getting $USER inside shell script when running with sudo?

On my system the variable $SUDO_USER is set to the caller’s user name. You shouldn’t extract the username from the ${HOME} variable directly. It’s being configured and not calculated. To Extract the username you could take a look into /etc/passwd file, but this is very system dependent, e.g. sometimes you have to look into a … Read more

Unable to install Python without sudo access

How can I install to a path under my home directory? mkdir /home/masi/.local cd Python-2.6.1 make clean ./configure –prefix=/home/masi/.local make make install Then run using: /home/masi/.local/bin/python Similarly if you have scripts (eg. CGI) that require your own user version of Python you have to tell them explicitly: #!/home/masi/.local/bin/python instead of using the default system Python … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)