Root access fail - virtual-machine

I've installed next:
sudo apt-get install sendmail
sudo apt-get install telnetd
After sudo reboot and Can not login as root.
I've tried to reset password from control panel, but it has no effect
I can login as root only under another user using "su".\
It is virtual server

open file /etc/ssh/sshd_config
add or uncomment this line
PermitRootLogin yes

Related

Apache2 command such as a2enmod and a2ensite no working its showing command not found in Ubuntu

I am deploying Flask application in Apache2 server during this i need to run a command for enabling mod_wsgi by using:
sudo a2enmod wsgi
but its showing:
sudo: a2enmod: command not found
please help
thanks
I had the same problem with using Ubuntu 16.04 in AWS. However, installing apache2 along with libapache2-mod-wsgi and python-dev solved the issue.
Try:
sudo apt-get update
sudo apt-get install apache2 libapache2-mod-wsgi python-dev
Then,
sudo a2enmod wsgi
I share this tips because it append to me :
If you enter into the root account with su, the /usr/sbin folder is not in the path and the a2enmod command is not found...
So you have to use su - instead ;)
This can happen if you switch to root user as su root instead of su - on Debian Buster
Installation debugging
For asking about installation debugging, you have to post (and think) about
Architecture (hardware)
OS with version
Host attibution (server, desktop, other)
Procedure followed for installation
Software (apache) version
Anyway
You could try to reinstall your package. If under Ubuntu, you could try:
sudo apt update &&
sudo apt reinstall apache2 libapache2-mod-wsgi
Then rerun:
sudo a2enmod wsgi

Unable to login to guacamole

I am very new to the guacamole project. I installed it following instruction online. But I am not able to login to the guacamole application. The instructions I followed are,
sudo apt-get update
sudo ufw enable
sudo ufw allow 22 && sudo ufw allow 8080
sudo apt-get install fail2ban build-essential htop libcairo2-dev libjpeg62-dev libpng12-dev libossp-uuid-dev tomcat7 -y
sudo apt-get install libfreerdp-dev libpango1.0-dev libssh2-1-dev libtelnet-dev libvncserver-dev libpulse-dev libssl-dev libvorbis-dev -y
sudo wget http://sourceforge.net/projects/guacamole/files/current/source/guacamole-server-0.9.8.tar.gz
tar -xzf guacamole-server-0.9.8.tar.gz
cd guacamole-server-0.9.8/
sudo ./configure --with-init-dir=/etc/init.d && sudo make && sudo make install
sudo ldconfig
sudo update-rc.d guacd defaults
sudo mkdir /etc/guacamole
sudo gedit /etc/guacamole/guacamole.properties
sudo gedit /etc/guacamole/user-mapping.xml
sudo mkdir /usr/share/tomcat7/.guacmole
sudo ln -s /etc/guacamole/guacamole.properties /usr/share/tomcat7/.guacmole
sudo wget http://sourceforge.net/projects/guacamole/files/current/binary/guacamole-0.9.8.war
sudo mv guacamole-0.9.8.war /var/lib/tomcat7/webapps/guacamole.war
sudo service guacd start
sudo service tomcat7 start
My user-mapping.xml file is configured as below,
<user-mapping>
<authorize username="sandesha" password="sandy" >
<connection name="RDP">
<protocol>rdp</protocol>
<param name="hostname">103.5.133.3</param>
<param name="port">22</param>
</connection>
</authorize>
</user-mapping>
When I hit localhost:8080/guacamole, I am getting one login screen, but if I enter the credential information I configured in user-mapping.xml, it is throeing invalid-credential error. How to resolve this?
The error you are getting indicates that the Guacamole application cannot find user-mapping.xml file. Normally, this file is stored in the following locations:
directory specified by system property guacamole.home
directory specified by environment variable GUACAMOLE_HOME
directory .guacamole located in the tomcat home directory
From the instructions you have posted it looks like you are using the last option. However, your directory is '.guacmole' with one 'a' missing. The two lines from your instructions should be:
sudo mkdir /usr/share/tomcat7/.guacamole
sudo ln -s /etc/guacamole/guacamole.properties /usr/share/tomcat7/.guacamole

Completely removing PhpMyAdmin from Debian 7

For some reason, my PhpMyAdmin on a new-ish server was giving me the 500 internal error.
I can completely remove PMA since it's not being used for anything currently, but I'd like to set up my database on it.
I done
apt-get remove phpmyadmin
apt-get --purge phpmyadmin
service apache2 restart
I also remove the include line from /etc/apache2/apache2.conf
Then the etc/phpmyadmin file has been removed, however http://198.245.62.75/phpmyadmin/ still asks for a username/password and re-installing gives me the same issues.
Can anyone point me in the right direction with this please?
sudo dpkg -P phpmyadmin
sudo rm -f /etc/apache2/conf.d/phpmyadmin.conf
sudo service apache2 restart
or
sudo apt-get autoremove phpmyadmin
And clear you cache ;)

Can not make ubuntu virtual machine fullscreen

i am using windows 8.1 on a 15 inch laptop. I have installed ubuntu 14.04.2 LTS on virtual box and have also installed the guest addition.But still i am not getting the "auto-resize guest display "or "seamless mode" option in the view menu?
From the menu bar,
Click on "Devices." You will see "Insert Guest Additions CD Image" option there.
"Insert Guest Additions CD Image" inserts a disk image on a virtual CD on your machine.
This virtual CD usually starts automatically with autorun, but if not, just go to "Computer" and launch the "VboxWindowsAdditions" exe file on the CD and follow the installation
sudo apt update && sudo apt upgrade
sudo apt install open-vm-tools open-vm-tools-desktop
Here below steps works for me ---
Upgraded linux-image and headers sudo apt-get install linux-image-3.11.0-15-generic linux-headers-3.11.0-15-generic (Perhaps virtual would work just as well as the generic one.):
Installed linux-image-extras with the hyperv-drivers:
sudo apt-get install linux-image-extra-virtual
Set video mode (Pretty much what you already did):
Set GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1680x1050" in /etc/default/grub.
Update grub: sudo update-grub
Reboot
refer below link for more detail https://askubuntu.com/questions/384602/ubuntu-hyper-v-guest-display-resolution
First, type the following in the terminal:
sudo apt-get install gcc perl make
After this, you can follow these steps:
Click on "Devices." You will see "Insert Guest Additions CD Image" option there.
"After clicking a Dialog Box opens up, Click on Run.
After it is installed, restart the VM.
I was stuck with the same problem. I did it manually from the ubuntu terminal, here are the steps:-
1 cd /media
2 ls
3 mkdir device cdrom1
4 sudo mkdir device cdrom1
5 ls
6 sudo mount /dev/cdrom /media/cdrom1
7 cd cdrom1/
8 ls
9 sudo ./VBoxLinuxAdditions.run
10 sudo reboot
This worked for me.

mCrypt not present after Ubuntu upgrade to 13.10

After I have upgraded my system from Ubuntu 13.04 to 13.10 several problems have occurred with apache, mysql and php configurations.
I solved most of them but I can't seem to get mCrypt library working.
Package is installed so i don't need to apt-get it. Server works and everything seems fine, but when I try to run php artisan serve with Laravel 4, I get a message that mCrypt is required.
I did php --ri mcrypt and the output was Extension 'mcrypt' not present.
I have tried putting extension=mcrypt.so to /etc/php5/apache2/php.ini but it didn't work.
Any ideas?
Output of dpkg --get-selections | grep php5
libapache2-mod-php5 install
php5 install
php5-cli install
php5-common install
php5-gd install
php5-json install
php5-mcrypt install
php5-mysql install
php5-readline install
I think I found the solution at launchpad.net.
sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available
sudo php5enmod mcrypt
sudo service apache2 restart
This worked for me.
I had this problem with Ubuntu 14.04 and I did the following to resolve it:
sudo apt-get install php5-mcrypt
sudo php5enmod mcrypt
sudo service apache2 restart
I also have this problem with Ubuntu 14.04 after install.
First enable the mcrypt
sudo gedit /etc/php5/apache2/php.ini
Add this command in any line
extension=mcrypt.so
Create conf.d folder in /etc/php5
sudo mkdir conf.d
And inside that folder create mcrypt.ini file
sudo gedit mcrypt.ini
Then add this command to that file
extension=mcrypt.so
Then create a link to file
sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available
Enable mcrypt module
sudo php5enmod mcrypt
Restart apache
sudo service apache2 restart
From Ubuntu 13.10 to 14.04:
sudo php5enmod mcrypt
sudo service apache2 restart
Works for me.
I also had this problem with Ubuntu 14.04 and Nginx,but the tip for me was restart the FPM service, so I did:
Install the library
apt-get install php5-mcrypt
Find the path
updatedb && locate mcrypt.so
Set the path of mcrypt.so inside the mcrypt.ini file located in /etc/php5/mods-available/mcrypt.ini
extension=/usr/lib/php5/20121212/mcrypt.so
And then restart the FPM service
service php5-fpm restart
Another solution if the package is already installed:
sudo aptitude reinstall php5-mycript
This worked for me after doing upgrade
Try this code:
ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/apache2/conf.d/20-mcrypt.ini
service apache2 restart
I had the same problem with PHP 5.5.14 running on Mac OS X Yosemite. I was trying to install Laravel 5.0. And when I tried to create a new project I got an error like below (even when I tried to start the laravel server with php artisan serve
Alejandros-MacBook-Pro:Documents Lexynux$ laravel new blog
Crafting application...
PHP Notice: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /Library/WebServer/Documents/blog/config/app.php on line 83
PHP Notice: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /Library/WebServer/Documents/blog/config/app.php on line 83
Generating optimized class loader
Compiling common classes
Compiling views
PHP Notice: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /Library/WebServer/Documents/blog/config/app.php on line 83
Application key [CCOPocoMjnJTx4AFXk64wqyTKyo3BlHq] set successfully.
Application ready! Build something amazing.
Alejandros-MacBook-Pro:Documents Lexynux$
So I just added the line below at the end of my php.ini file with the nano editor:
extension=mcrypt.so
sudo nano /etc/php.ini
Finally just restart the Terminal and restart the laravel app server with
php artisan serve
And it works fine!
just found on php.net
Note, for Ubuntu, simply installing php5-mcrypt did not get mcrypt to work. You need to execute the following commands as root to enable it:
apt-get install php5-mcrypt
mv -i /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/
php5enmod mcrypt
service apache2 restart
http://php.net/manual/en/mcrypt.installation.php#114609
Sometimes, this "problem" occurs because you entered an artisan command on your local machine instead of on your virtual machine. If you are using Homestead, mcrypt is already installed. Consider it a reminder to homestead ssh