martedì 28 aprile 2015

How to Enable / Disable Multiple RDP Sessions in Windows 2012

How to Enable/Disable Multiple RDP Sessions in Windows 2012By default, Windows 2012 servers allow a single Remote Desktop session. If only one session is available and you take over another person's live session, you may choose to enable multiple RDP sessions. This article describes the process for enabling and disabling multiple sessions.

Enable Multiple RDP Sessions
  1. Log into the server using Remote Desktop.
  2. Open the start screen (press the Windows key) and type gpedit.msc and open it
  3. Go to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections.
  4. Set Restrict Remote Desktop Services user to a single Remote Desktop Services session to Disabled.
  5. Double click Limit number of connections and set the RD Maximum Connections allowed to 999999.
Disable Multiple RDP Sessions
  1. Log into the server using Remote Desktop.
  2. Open the start menu and type 'gpedit.msc' and open it
  3. Go to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections.
  4. Set Restrict Remote Desktop Services user to a single Remote Desktop Services session to Enabled.

Add new user account from command line (CMD)

mercoledì 1 aprile 2015

CentOS Bugzilla install



I just went through installing Bugzilla on CentOS at work. I had to follow several guides online in order to get it installed and configured correctly. I thought I combine all of my findings into one simple guide.
I will be installing the latest Bugzilla at the moment which is 4.5.2 on a fresh install of CentOS 6.5 64-Bit.
Ok, Lets get started. Launch Terminal and switch to root:
su
Bugzilla
In order to get Bugzilla up and running, we need to install Apache, MySql, and also gcc for compiling the Bugzilla packages.
Installing Apache
yum install httpd mod_ssl
Install MySql in Bugzilla
After the install is done, open port 80 in the Firewall
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
Save the changes to the firewall
service iptables save
Start the Apache service
service httpd start
Lets make sure that Apache will restart every time you restart the machine:
/sbin/chkconfig httpd on
Apache on Bugzilla
Lets test our Apache server by opening a browser windows and type our localhost IP, 127.0.0.1:
Apache on CentOS
Install MySql
yum install mysql-server mysql php-mysql
MySql on CentOS
Lets make sure MySql starts at boot
chkconfig mysqld on
Auto start MySql on CentOS
Start MySql
service mysqld start 
Start MySql in CentOS
Set up MySql for root access
mysql -u root
Set the root user password
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('some_new_password');
Once done, exit MySql
exit
Install gcc and prep packages
yum install gcc perl* mod_perl-devel
Install gcc in CentOS
Install Bugzilla
Now that we have all the prep work done and ready, lets go ahead and download the latest Bugzilla
wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-4.5.2.tar.gz
Download latest Bugzilla for CentOS
unpack the download to the apache directory
tar zxvf bugzilla-4.5.2.tar.gz -C /var/www/html/
browse to the directory we just unpacked the file to and rename it to bugzilla
cd /var/www/html/
mv -v bugzilla-4.4 bugzilla
Login to MySql as root with the root password we set up earlier and create a new Database for Bugzilla
mysql -uroot -p
create database bugzilla_DB;
Grant all privileges to the database we just created to a newly created database user that we will be calling bugz and password bugz
grant all on bugzilla_DB.* to bugz@localhost identified by 'bugz';
Exit MySql
\q
We should be in the bugzilla directory still. Lets check for all required bugzilla modules before the install:
./checksetup.pl
After the check is done, we will see some missing modules that needs to be installed:
Bugzilla install on CentOS
Type the command below to install all missing modules automatically:
/usr/bin/perl install-module.pl --all
Lets do a check again to make sure all the modules did install
./checksetup.pl
If all is good, we will get a message to edit the localconfig file for installation.
Bugzilla install on CentOS
Edit the localconfig file with your favorite text editor. Since I have GUI, I used gedit for a simple quick edit
gedit ./localconfig
Make sure you input the correct database name, user, and password we created earlier in the localconfig file
Bugzilla install in CentOS
Run ./checksetup.pl again
./checksetup.pl
If all is well, checksetup.pl should now successfully configure Bugzilla.
Bugzilla install on CentOS
Now we need to add Bugzilla to our Apache config file. Open httpd.conf with a text editor
gedit /etc/httpd/conf/httpd.conf
Add the following to the end of httpd.conf file
1
2     DocumentRoot /var/www/html/bugzilla/
3
4 
5
6     AddHandler cgi-script .cgi
7     Options +Indexes +ExecCGI
8     DirectoryIndex index.cgi
9     AllowOverride Limit FileInfo Indexes
10
Bugzilla install on CentOS
Lastly, we need to edit .htaccess file and comment out “Options -Indexes” line at the top by adding “#”
Bugzilla install on CentOS
Lets restart our apache server and test our installation
service httpd restart
Bugzilla 4.5.2 on CentOS 6.5
If all goes well, we should see our successfully installed Bugzilla when we browse to localhost :)
Hope this helps. Let me know if you have any questions.

Reset MySQL password

The Server root user is the server's main user. The MySQL root user has complete control over MySQL only. The two 'root' users are not connected in any way.

Stop MySQL

The first thing to do is stop MySQL. If you are using Ubuntu or Debian the command is as follows:
sudo /etc/init.d/mysql stop
For CentOS, Fedora, and RHEL the command is:
sudo /etc/init.d/mysqld stop

Safe mode

Next we need to start MySQL in safe mode - that is to say, we will start MySQL but skip the user privileges table. Again, note that you will need to have sudo access for these commands so you don't need to worry about any user being able to reset the MySQL root password:
sudo mysqld_safe --skip-grant-tables &
Note: The ampersand (&) at the end of the command is required.

Login

All we need to do now is to log into MySQL and set the password.
mysql -u root
Note: No password is required at this stage as when we started MySQL we skipped the user privileges table.
Next, instruct MySQL which database to use:
use mysql;

Reset Password

Enter the new password for the root user as follows:
update user set password=PASSWORD("mynewpassword") where User='root';

and finally, flush the privileges:
flush privileges;

Restart

Now the password has been reset, we need to restart MySQL by logging out:
quit
and simply stopping and starting MySQL.

On Ubuntu and Debian:

sudo /etc/init.d/mysql stop
...
sudo /etc/init.d/mysql start

On CentOS and Fedora and RHEL:

sudo /etc/init.d/mysqld stop
...
sudo /etc/init.d/mysql start

Login

Test the new password by logging in:
mysql -u root -p
You will be prompted for your new password.

Redhat CentOS Fedora Yum Management


 yum clean all
 yum check
 yum erase apf
yum update