The Biggest Problem With Bitbucket Admin Password Reset, And How You Can Fix It

tags: bitbucket login, bitbucket server,  bitbucket tutorial, bitbucket reset password, atlassian bitbucket, atlassian, bitbucket, git, git atlassian, git commands, bitbucket server login

Bitbucket Lockout Recovery Process

As an administrator, you may find yourself locked out of Bitbucket Server and unable to log in. This situation can arise when all users are managed externally from Bitbucket Server, and Bitbucket Server becomes unable to access those user directories for some reason, including
BITBUCKET_HOME:      /bitbucket/atlassian/application-data/bitbucket
CATALINA_BASE:           /opt/atlassian/bitbucket/4.0.3
Step  1: 

Locate your Bitbucket Home Directory 

ps  -ef   | grep  atl

Find following line “JVM_SUPPORT_RECOMMENDED_ARGS” in your CATALINA_BASE 

grep -HRn "JVM_SUPPORT_RECOMMENDED_ARGS" /opt/atlassian/bitbucket/4.0.3/bin

Screenshot Bitbucket Server Version 4.0.x 


for Windows, edit setenv.bat  file
For linux, edit setenv.bat file

Screenshot Bitbucket Server Version  5.X+, and later.


For Window, edit  _start-webapp.bat
For Linux, exit  _start-webapp.sh

Step 2:

Open file as per the your bitbucket server version :
vi  /opt/atlassian/bitbucket/4.0.3/bin/setenv.sh
Find line JVM_SUPPORT_RECOMMENDED_ARGS and add following line “-

Datlassian.recovery.password=temporarypassword”
Video Tutorial - Click Here



# Occasionally Atlassian Support may recommend that you set some specific JVM arguments.  You can use this variable
# below to do that.
#
JVM_SUPPORT_RECOMMENDED_ARGS="-Datlassian.recovery.password=temporarypassword"

Here “temporarypassword” is temporary password to open git in recovery mode, you can set  any suitable recovery password. 


Step 3:

After the update bitbucket setenv.sh file restart service  and open bitbucket server

/etc/init.d/atlbitbucket stop/etc/init.d/atlbitbucket start



Username:  recovery_admin
Password: temporarypassword

Note:  Bitbucket is running in recovery mode. You can log in as recovery_admin  using the password specified when starting Bitbucket - Bitbucket Server Recovery Doc

Step 4:

Change Bitbucket Server Admin Password : After successfully login on Bitbucket Server

Go to Settings → User → Administrator 

Click on Change Password and Update new password 


Step 5:

Now we have  successfully changed  admin password, Now we will disable bitbucket server recover mode
vi  /opt/atlassian/bitbucket/4.0.3/bin/setenv.sh

Find line JVM_SUPPORT_RECOMMENDED_ARGS and remove following line “-Datlassian.recovery.password=temporarypassword”

# Occasionally Atlassian Support may recommend that you set some specific JVM arguments.  You can use this variable
# below to do that.
#
JVM_SUPPORT_RECOMMENDED_ARGS=""



Bitbucket Recover mode disabled, Restart bitbucket service 

/etc/init.d/atlbitbucket stop/etc/init.d/atlbitbucket start

Thanks




What is Docker | How to Install Docker in CentOS / RHEL 7 with Screenshot | linuxtopic

What is docker ?
What is Docker definition ?

docker, docker tutorial, docker hub, docker container, docker compose, docker networking, docker nginx, docker images, docker linux, docker basic commands, run docker, run docker image, run docker container, linuxtopic
Docker Installation - What is Docker

Tags: docker, docker tutorial, docker hub, docker container, docker compose, docker networking, docker nginx, docker images, docker linux, docker basic commands, run docker, run docker image, run docker container, linuxtopic

Docker is an open source containerization technology that is designed to make it easier to create, deploy, and run applications using containers.


To install some dependency package
yum install -y yum-utils device-mapper-persistent-data lvm2


To Install repository
yum install epel-releaseORyum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Verify
cat /etc/yum.repos.d/docker-ce.repo


To Install Docker on CentOS/RHEL 7
yum install docker


To list package
yum list docker-ce --showduplicates | sort -r
To Start Docker Service on CentOS 7
systemctl start dockersystemctl status dockersystemctl enable docker

Verify Docker Version and info Docker
docker version

docker --version

docker info


To help docker
docker --help
To Remove Docker

check docker package on your system, if already installed remove it and install a fresh one
yum list docker-ce --showduplicates | sort -r 
yum remove docker-*
To get more info about docker - Click here 

How to Create JKS Using Ansible | Generate p12 Using Playbook | Ansible Tutorial

Tags: ansible command module, ansible pip, ansible prompt, ansible tutorial, ansible, expect module, ansible PKCS12, Ansible JKS, JKS, generate jks file, generate p12 file, linuxtopic
How to create jks using ansible ?
How to create p12 using ansible ?
How to execute a command and responds to prompts in ansible ?
How to use expect/read in ansible ?

In This topic we will create PKCS12 file and then create JKS file using expect module.

Step 1:

Go to the ansible main directory and create yml file with suitable name
cd /etc/ansiblevi p12.yml
---
- name: Use EXPECT / Read
  hosts: 127.0.0.1
  gather_facts: false

We define name and hosts entry for execution of this playbook, you can replace 127.0.0.1 with your targeted hosts or group

  tasks:

  - name: install expect
    pip: name=pexpect

pexpect python module require on Client so first we will install pexpect using pip module

  - name: Create PKCS12
    expect:
     command: openssl pkcs12 -export -in /etc/ssl/linuxtopic/linuxtopic-self-signed.crt -inkey /etc/ssl/linuxtopic/server-master.key -out  /opt/server-pkcs.p12
     responses:
       Enter Export Password: "password"
       Verifying - Enter Export Password: "password"

In 2nd task we use expect module, before use it read document,  at list run your command on hosts and copy all response like it will ask “Enter Export Password:”  you can type your response in double cote (“”) 

    Enter Export Password: "password"

ansible command module, ansible pip, ansible prompt, ansible tutorial, pexpect python module, ansible, expect module, ansible PKCS12, Ansible JKS, JKS, generate jks file, generate p12 file, linuxtopic
Generate p12 file
  
- name: Generate JKS file
    expect:
     command: keytool -importkeystore -srckeystore /opt/server-pkcs.p12 -srcstoretype pkcs12 -destkeystore /opt/server-jskfile.jsk -deststoretype JKS
     responses:
       Enter destination keystore password:  "jkspassword"
       Re-enter new password: "jkspassword"
       Enter source keystore password: "password"

3rd task: we generate JKS file using same expect module 

ansible command module, ansible pip, ansible prompt, ansible tutorial, pexpect python module, ansible, expect module, ansible PKCS12, Ansible JKS, JKS, generate jks file, generate p12 file, linuxtopic
Generate JKS file using ansible

Your playbook has been ready to execute, you can run using ansible-playbook command, just copy full playbook:

---
- name: Use EXPECT / Read
  hosts: 127.0.0.1
  gather_facts: false


  tasks:

  - name: install expect
    pip: name=pexpect


  - name: Create PKCS12
    expect:
     command: openssl pkcs12 -export -in /etc/ssl/linuxtopic/linuxtopic-self-signed.crt -inkey /etc/ssl/linuxtopic/server-master.key -out  /opt/server-pkcs.p12
     responses:
       Enter Export Password: "password"
       Verifying - Enter Export Password: "password"


  - name: Generate JKS file
    expect:
     command: keytool -importkeystore -srckeystore /opt/server-pkcs.p12 -srcstoretype pkcs12 -destkeystore /opt/server-jskfile.jsk -deststoretype JKS
     responses:
       Enter destination keystore password:  "jkspassword"
       Re-enter new password: "jkspassword"
       Enter source keystore password: "password"



Step 2:

ansible-playbook  p12.yml



Verify by checking jks and p12 file

ll  /opt/



Both files available in opt directory, means playbook working fine 



Your support is must so Please Like, share and comment on this ansible  artical.

Thanks,
www.linuxtopic.com

How to Generate SSL Certificate using Ansible | Generation CSR using Ansible


In this tutorial we will install openssl package and use following listed modules

Openssl_privatekey - To generate private key
Openssl_csr - To generate csr file
Openssl_certificate - To Generate certificate

Before we start this tutorial we read example and doc of all module
ansible-doc openssl_privatekeyansible-doc openssl_csransible-doc openssl_certificate

Step 1:

Go to ansible main directory and create yml file with suitable name
cd /etc/ansiblevi ssl-certs.yml
#We define name and hosts entry for execution of this playbook, you can replace 127.0.0.1 with your targeted hosts or group

---
- name: generate ssl certificate
  hosts: 127.0.0.1
  gather_facts: false

# For generation of SSL certs we required a openssl package so our first task is to install package on remote/localhost, 

  tasks:

  - name: Install openssl package
    yum: name=openssl state=latest

# This is optional steps to keep ssl certificate, create a directory

  - name: Create ssl directory
    file: path=/etc/ssl/linuxtopic state=directory mode=0775

# Now we will generate a private key by using a "openssl_privatekey" module 

  - name: Generate Private key
    openssl_privatekey: path=/etc/ssl/linuxtopic/server-master.key

# After generation of key we will generate csr with the help of "openssl_csr" module 

  - name: Generate CSR
    openssl_csr: 
     path: /etc/ssl/linuxtopic/linuxtopic-client.csr
     privatekey_path: /etc/ssl/linuxtopic/server-master.key 
     common_name: linuxtopic.com 
     country_name: IN
     email_address: [email protected]
     organization_name: linuxtopic

# at the end of the tasks we will generate certificate using  "openssl_certificate" module

  - name: Generate a self signed certificate
    openssl_certificate:
     csr_path: /etc/ssl/linuxtopic/linuxtopic-client.csr
     path: /etc/ssl/linuxtopic/linuxtopic-self-signed.crt
     privatekey_path: /etc/ssl/linuxtopic/server-master.key
     provider: selfsigned



Step 2:

To execute ansible playbook
ansible-playbook ssl-certs.yml


Step 3: 

To Verify 
ls -lah /etc/ssl/linuxtopic/


Your support is must so Please Like, share and comment on this ansible  artical.

Thanks,
www.linuxtopic.com

How to Create 100% Securely AWS Account Using Debit Card | AWS Free Tier Account

aws certification,  aws, aws cloud, aws console, aws login, aws training, aws cloud computing, aws server, aws tutorial, aws security, aws free training, aws free, aws full form, what is aws, linuxtopic, aws ec2, aws s3, amazon web services, cloud computing tutorial, aws iam
AWS Account
Tags: aws certification,  aws, aws cloud, aws console, aws login, aws training, aws cloud computing, aws server, aws tutorial, aws security, aws free training, aws free, aws full form, what is aws, linuxtopic, aws ec2, aws s3, amazon web services, cloud computing tutorial, aws iam
What is AWS ?

AWS - Amazon Web Service is Cloud Platform that offering over 160+ fully featured services globally.

How to Create a Free Account on AWS ?

There are following steps to Create a free account on AWS.

1 - Open Official Web Site of AWS
https://aws.amazon.com


Click on Create on Free Account - Button, it will open a Signup form

2 - Fill up Signup form with valid email address, choose password and AWS account name.

aws certification,  aws, aws cloud, aws console, aws login, aws training, aws cloud computing, aws server, aws tutorial, aws security, aws free training, aws free, aws full form, what is aws, linuxtopic, aws ec2, aws s3, amazon web services, cloud computing tutorial, aws iam
AWS Signup - Linuxtopic
Note: You can click on Sign in if you have already AWS account.

Press Continues button, For Update Contact Information, We will Select Account Type, Two option "Professional and Personal" are available, you can select according to your need, in this tutorial we will select a person.

3 -  Add your Full Name as you like, Phone Number, Select  your country from drug down menu,  Address, City, State, Postal Code then check on the AWS Agreement.



After Fill up all details, Click on "Create Account and Continues" button, it will ask you a Payment Information.

Type Credit / Debit Card details like Number, Expire date, Cardholder name.

Select your billing Address other wise click on use a new address option for add new address.

PAN Card option, As your wish to add them  otherwise select no.



Press on "Secure Submit" It will charge Rs 2 and it is  refundable after 3 - 5 business days. 

After Successfully payment, Confirm your Identity. 

4 - Select your Country Code from Drug down, add your phone number and type Security check 

 

Press "Contact me", you will received a call from AWS.



5 - Confirm your 4 digit number on your phone keypad.



Complite Video Tutorial



6 - Your Identity has been verified now press "continues"  and select your plan



There are 3 Plan Basic, Developer and Business available on AWS, select your plan according to your need. here we will select a Basic Plan by Click on "Free" Button.


Select your "My role is" and "I am interested in" from drug down menu and press submit button.

Your account has been successfully created, now you can login in your account by click on Sing in button of top right corner.





Interview Question | LVM | Disk Management | Logical Volume Manager

LVM Extents, Logical Volume Manager, Disk Management, lvm in ubuntu, lvm linux, LVM, lvextend, lvresize, vg
Logical Volume Manager
LVM Extents, Logical Volume Manager, Disk Management, lvm in ubuntu, lvm linux, LVM, lvextend, lvresize, vg
Q - Why lvm required ?

LVM stands for Logical Volume Manager and it is a capable to resize the filesystem using lvextend and lvreduce command. so lvm is required

For Example we have 120GB disk and its getting full, We can resize there partition easily and its risky, if same disk using a LVM, we can add another disk and resize there partition easily


Q - How to add another disk in LVM

1) Install New HDD

2) Create Partition

3) pvcreate /dev/disk partation
pvcreate /dev/sdb1
4) vgextand <vgname> <partation>
vgextend linuxtopic /dev/sdb1
5) lvextend -L +10G <LVM Partition>


Q - Is it possible to extend LVM partition ?

Q - How to extend a lvm ?

Q - How to increase the size of a volume partition ?

Yes, We can extend/increase the LVM partition, We require a lvextend command

lvextend -L +10G <LVM Partition>

it will extend 10Gb


Q - What a difference between -L and -l in LVM ?

-L represent the LogicalVolumeSize and -l represent the LogicalExtentsNumber

-L used to resize lvm Size and -l used to resize the lvm extents


Q - How to reduce or shrink the size of LVM partition ?

Q - what steps of lvm partition reduce and shrink ?


Below are the Steps to reduce the size of LVM partition

1) Unmount the filesystem
umount <lvm partation>

2) run resize2fs command with

resize2fs <lvm partition> <size>

3) run lvreduce command

lvreduce -L -10G <lvm partition>

Q - What is LVM extents ?

Q - What is default value of extents ?

Q - What is extents in lvm ?


LVM breaks up each physical volume into extents & Extents are the elementary blocks of LVM allocation, one extent default value is 4MB.


Also Read...



Thanks

End of this LVM/Disk Management 
 Interview Question,  we need your support so i request you to please comment if something missed by me, share and like this post.

www.linuxtopic.com

Interview Question | What is UID and GID in Linux | User Identifier | Group Identifier in Linux

In This Post we cover, What is UID in Linux, What is GID in Linux, What do you understanding of UID and GID in Linux, UID 1000, Default UID value,What is uid and gid for the root user?
What is UID and GID in Linux ?
What is UID and GID in Linux ?
What is UID in Linux ?
How to Default value of UID ?
What is differences of UID and GID ?
What is uid and gid for the root user?

UID : User Identifier

UID (User identifier)is a number that assigned by Linux to every user of the system. UIDs are stored in the /etc/passwd

Value of UID

0 to 99 value = System

100 to 499 = Reserved for dynamic allocation

500 / 1000 = Reserved for new users

How to Check Default UID Value ?

We can check default uid value by the command :
cat /etc/login.defs | grep UID
Output something like this

UID_MIN 1000
UID_MAX 60000
#SYS_UID_MIN 100
#SYS_UID_MAX 999


What is UID and GID of root User ?


root is the first user of the system so uid and gid is 0

GID : Group Identifier


All Groups of Linux are defined by GIDs (group IDs). GIDs are stored in the /etc/groups file. the first 100 GIDs are usually reserved for system use.


Difference UID and GID


UID

UID full form is User Identifier, It Used to assign a Identity Number of User
UID Store in /etc/passwd

GID

GID full form is Group Identifier, It Used to assign a Identity Number of Group
GID Store in /etc/group



Thanks

End of this UID & GID 
 topic,  we need your support so i request you to please comment if something missed by me, share and like this post.

www.linuxtopic.com

Interview Question | What is Umask | User Mask or User file creation MASK in Linux | Linuxtopic

umask calculator, umask 0022, umask, umask in linux, chmod, stiky bit,
UMASK - Default file and folder Permission
What is Umask ?
What is stiky bit ?
What is default Umask Permission of File ?
What is default Umask Permission of directory ?
How to Calculate UMASK ?

UMASK (User Mask or User file creation MASK) is the default permission of the file and directory. we can check default umask permission using "umask" command.
umask
Output of umask something like 0002 or 002. default umask value of system is 002 ( Normal User ) or 022 ( Root)

Default Umask File and Folder Permission 

Default permission for file is 666 because file required read and write permission only binary or script require execute permission &  directory default permission is 777.

how to Calculate UMASK permission for file and folder ?

Octal value : Permission

0 : read, write and execute
1 : read and write
2 : read and execute
3 : read only
4 : write and execute
5 : write only
6 : execute only
7 : no permissions


1) check default umask value by "umask" Command ( by default 0002 or 002 permission )

2) default file permission is 666 and folder permission is 777

formula is = (default file/folder permission) - (default system permission )

file = 666 - 002 = 664 permission will be set when you will create a file

folder = 777 - 002 = 775  Permission will be set when you will create a folder

How to change Umask default permission ?

we can setup umask in /etc/bashrc or /etc/profile file for all users.

Point :

The default umask 002 used for normal user. With this mask default directory permissions are 775 and default file permissions are 664.

The default umask for the root user is 022 result into default directory permissions are 755 and default file permissions are 644.

For directories, the base permissions are (rwxrwxrwx) 0777 and for files they are 0666 (rw-rw-rw).

3 - What is sticky bit ?

A sticky bit is a special permission of the directory, in this permission only owner of the file or root user can delete/rename the file no other user have permission to delete or rename it.

Sticky bit measure a security to avoid deletion of critical directory and their content. We can set sticky/setgid/setuid by “chmod” command

sticky/setgid/setuid -

where:

1 = sticky bit

2 = setgid (set group id)

4 = setuid (set user id)

Command to set sticky bit on folder
chmod 1755 /stick/test


Thanks

End of this UMASK  
 tutorial,  we need your support so i request you to please comment if something missed by me, share and like this post.

www.linuxtopic.com


What is IPMI | IPMIView | IPMI Tool | IPMI Utility

What is IPMI ?
What is a Full Form of IPMI ?
How to Access Supermicro using IPMI tools ?
How to Configure IPMI in Server ?


Configuring the IPMI Settings

ipmitool, ipmi, ipmivies, ipmi full form, ipmitool commands, ipmi port, ipmi tool, ipmi supermicro, ipmi console, ipmi over lan, Intelligent Platform Management Interface, how to use ipmi, ipmi supermicro, ipmi linux, ipmi bmc, ipmi
IPMI Port - IPMI Utility 
Step 1

BIOS Setting - Enable IPMI in BIOS

During the system boot up, press the < Del >  key to enter the BIOS.



Go to the Advanced tab.

Select Serial Port Console Redirection and press < Enter >



Highlight SOL/COM2 Console Redirection,  press < Enter > and ENABLED



Step 2

IPMI Setting  - BMC Network Configuration 
  • Go to the Advanced tab.
  • Select the IPMI tab 
  • Highlight Update IPMI LAN Configuration, press < Enter > 
ipmitool, ipmi, ipmivies, ipmi full form, ipmitool commands, ipmi port, ipmi tool, ipmi supermicro, ipmi console, ipmi over lan, Intelligent Platform Management Interface, how to use ipmi, ipmi supermicro, ipmi linux, ipmi bmc, ipmi
IPMI - BMC Network Configuration 

Select < Yes > and Again Press < Enter >


Configuration Address Source and select [Static] / [ DHCP ] and Press < Enter >



In This Example we select Static and Configure IP Address according to our network
  • Station IP Address = 172.17.20.230
  • Subnet Mask = 255.255.255.0
  • Gateway IP Address = 172.17.20.1
  • VLAN = Enable/Disable
ipmitool, ipmi, ipmivies, ipmi full form, ipmitool commands, ipmi port, ipmi tool, ipmi supermicro, ipmi console, ipmi over lan, Intelligent Platform Management Interface, how to use ipmi, ipmi supermicro, ipmi linux, ipmi bmc, ipmi
IPMI Configuration 

Note : This IP Configuration is just for example , set IP Address according to Network/Requirement


Note : We can enable VLAN Support, After enable we can define VLAN ID, Currently we configured IPMI Without VLAN Support 



Last ans Final Step Save and Exit Setting

Step 3:

Access IPMI - Intelligent Platform Management Interface
  • IPMIView Utility  - Click Here
  • Web Utility  - Click Here

How to Access Supermicro Server using IPMI Web | IPMI Web Access

tags: ipmitool,ipmi,ipmivies,ipmi full form,ipmitool commands,ipmi port,ipmi tool,ipmi supermicro,ipmi console,ipmi over lan,Intelligent Platform Management Interface,how to use ipmi,ipmi linux,ipmi bmc,linuxtopic
How to Access Supermicro Using IPMIView Utility ?
IPMI View Utility ?
What is default username and password of IPMI ?
How to Access IPMI in Browser ?


There are two method to GUI access of IPMI

  1. IPMIView Utility 
  2. Web Access 
Before Start Check , How to Configure IPMI - Click Here

Connectivity to the Server

Step 1:
  • Connect laptop/desktop using LAN cable to dedicated IPMI LAN port 
  • Set IP address to you laptop on same range of IPMI IP & Verify by ping command 
ipmitool,ipmi,ipmivies,ipmi full form,ipmitool commands,ipmi port,ipmi tool,ipmi supermicro,ipmi console,ipmi over lan,Intelligent Platform Management Interface,how to use ipmi,ipmi linux,ipmi bmc,linuxtopic
Access Server - IPMI View 

For Example, Our IPMI IP ( 172.17.20.230/24 )
  • IP Address = 172.17.20.100
  • Subnet Mask = 255.255.255.0
  • Gateway = 172.17.20.1

Open Browser, best is google chrome, and access following url

https://172.17.20.230


Warning: Potential Security Risk Ahead -- Ignore This warning

Press "Advanced" Button and then Press "Accept the Risk and Continue"

ipmitool,ipmi,ipmivies,ipmi full form,ipmitool commands,ipmi port,ipmi tool,ipmi supermicro,ipmi console,ipmi over lan,Intelligent Platform Management Interface,how to use ipmi,ipmi linux,ipmi bmc,linuxtopic
IPMI View - Web Access
Note : Default Username and Password

User = ADMIN
Pass = ADMIN

After Login Success ! Screen


We can check all settings of server, get all details of server even we can controller our server with monitor using kvm console.

Get Hardware Information

System --> Hardware Info
ipmitool,ipmi,ipmivies,ipmi full form,ipmitool commands,ipmi port,ipmi tool,ipmi supermicro,ipmi console,ipmi over lan,Intelligent Platform Management Interface,how to use ipmi,ipmi linux,ipmi bmc,linuxtopic
IPMI 



Configuration

We can configure following :

  • alerts 
  • date & time
  • network
  • hostname
  • smtp
  • SSL Certificate
  • user
  • port and more


How to Change IPMI Default Password ?
How to Add User in IPMI ?

1. Click Users Tab


Select User and Press "Modify User" Button and Update new password

We can add new user in IPMI, just press on "Add User"

Remote Console

iKVM/HTML


Press "iKVM/HTML5" Button




Thanks