GithubHelp home page GithubHelp logo

christiangoeschel / passwdreset Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 25.15 MB

This program will take care of the main partition detection, mounting , and new root directory detection to make the password reset possible. Fully automated for your OVHcloud server.

Shell 100.00%
bash-script cybersecurity linux ovhcloud passwd vps dedicated-server bare-metal

passwdreset's Introduction

Hi there ๐Ÿ‘‹

Python

Bash / Shell

Cisco IOS CLI

HTML 5

CSS 3

passwdreset's People

Contributors

christiangoeschel avatar

Watchers

 avatar

passwdreset's Issues

Not compatible with Dedicated servers

Commands that may help build the mechanism to detect server type ( VPS | Dedicated ) and detect the main partition:

#PTR record for server type detection

ip=$(ip -o a | grep -E 'eth0.*inet' | grep -v 'inet6' | cut -d '/' -f 1 | cut -d 't' -f 3 | cut -c 2-)
dig -x $ip | grep -E 'ns|vps' | grep -E 'PTR' | cut -d 'R' -f 2

#Iteration of all potential partitions

pot_part=$(lsblk | grep -E 'sd|nv' | grep -E 'G|T' | grep 'part' | cut -c 5-)

dsk_rslts=$(( $(lsblk | grep -E 'G|T' | wc -l) - 1 ))

for i in seq 1 $dsk_rslts;
do

mntpnt=$(tune2fs -l /dev/sda3 | grep 'mounted' | cut -d ":" -f 2)

echo $mntpnt

done

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.