Search This Blog

Tuesday, February 19, 2013

bash: /usr/bin/ssh: Permission denied

This message has been a headache, happening a couple of times when I upgrade or update packages.

albertsk@stokes:~$ ssh
bash: /usr/bin/ssh: Permission denied


root@stokes:ssh$ ll /usr/bin/wget
-rwxr-xr-x 1 root root 369848 Feb 10  2012 /usr/bin/wget*

root@stokes:ssh$ chmod og+x /usr/bin/ssh
chmod: changing permissions of `/usr/bin/ssh': Operation not permitted

root@stokes:ssh$ ll /usr/bin/ssh
-rwx------ 1 root root 650492 Feb 12 01:46 /usr/bin/ssh*

root@stokes:ssh$ chmod og+x /usr/bin/ssh
chmod: changing permissions of `/usr/bin/ssh': Operation not permitted

root@stokes:ssh$ lsattr /usr/bin/ssh
-u---a-------e- /usr/bin/ssh

root@stokes:ssh$ lsattr /usr/bin/wget
-------------e- /usr/bin/wget

root@stokes:ssh$ chattr -uai  /usr/bin/ssh

root@stokes:ssh$ lsattr /usr/bin/ssh
-------------e- /usr/bin/ssh

root@stokes:ssh$ chmod og+xr  /usr/bin/ssh
root@stokes:ssh$ ls /usr/bin/ssh
/usr/bin/ssh

albertsk@stokes:~$ ssh localhost
Last login: Tue Feb 19 15:10:25 2013 from localhost
Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-37-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

albertsk@stokes:~$ 

Monday, February 18, 2013

customized .bst file


/usr/share/texmf-texlive/bibtex/bst/natbib/

there are many .bst files, which one can modify.

After type/enter

$ texhash





Thursday, February 14, 2013

How to install Openmpi using ifort and icc





$ ./configure --with-tm=/usr/include/torque/  --prefix=/opt/openmpi-1.6.3-intel-pbs CC=icc   CXX=icpc   F77=ifort    FC=ifort

$ make all install

openssh reinstallation

sudo apt-get remove --purge openssh-server 
sudo apt-get install openssh-server

resolve memtest86+ (4.20-1.1ubuntu1) hangs

Quick workaround:
Append the following to /etc/default/grub:

GRUB_DISABLE_OS_PROBER=true

Run 
$ sudo update-grub2

This will disable os-prober so grub doesn't see the other disks (this way it won't fail with an error).
Run sudo dpkg --configure -a to complete the configuration (should be successful this time).
The side-effect of this workaround is that you will loose all other boot entries in GRUB, so if you have a Windows dual boot or other distro's, you should remove or comment the line in /etc/default/grub and then run sudo update-grub2 once more to fully populate the GRUB menu.

How to resolve “Could not get lock /var/lib/dpkg/lock” problem.

Delete two "lock" files.

sudo rm /var/lib/dpkg/lock

sudo rm /var/cache/apt/archives/lock

Saturday, January 26, 2013

How to install netcdf on Ubuntu



 apt-get install netcdf-bin  nco netcdf-doc libnetcdf-dev  libnetcdf6

Labels