Skip to content

Commit f310f45

Browse files
committed
Some docs updates
1 parent e85967e commit f310f45

File tree

4 files changed

+78
-8
lines changed

4 files changed

+78
-8
lines changed

operating-systems/linux/distros/rocky-vm.md

+35-2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ date +%F
5454
date +%x
5555
date +%T
5656
date -d 20250310 +%j
57+
# Convert timestamp to a date
58+
date -d "1970-01-01 20156 days"
59+
# Convert date to timestamp
60+
echo $(($(date --date="2025-01-25" +%s)/86400+1))
5761

5862
id root
5963
whoami
@@ -232,7 +236,8 @@ cat /etc/group
232236
cat /etc/gshadow
233237
234238
groupadd -g 1020 group1
235-
addgroup # Debian
239+
# Debian
240+
addgroup
236241
237242
groupmod -g 1022 group1
238243
groupmod -n group3 group2
@@ -244,8 +249,36 @@ groupdel group1
244249
245250
```bash
246251
# Users
252+
# root (uid=0) - system admin
253+
# system users (uid=201~999)
254+
# regulare users (uid>=1000)
255+
cat /etc/passwd
256+
cat /etc/shadow
257+
# ! For each line in the /etc/passwd file there must be a corresponding line in the /etc/shadow file.
258+
259+
# default settings
260+
cat /etc/login.defs
261+
cat /etc/default/useradd
262+
ls -lah /etc/skel/
263+
264+
useradd user1
265+
useradd -u 1002 -g 1020 -d /home/user user2
266+
passwd user1
267+
tail -n 2 /etc/passwd
268+
tail -n 2 /etc/shadow
269+
tail -n 2 /etc/group ; tail -n 2 /etc/gshadow
270+
# Debian
271+
adduser
272+
deluser
273+
274+
usermod -u 1005 user1
275+
usermod -L user2 # lock user
276+
277+
userldel -r user1 # deletes user's home dir, mail files and primary group
278+
```
247279
248-
userldel -r # deletes user's primary group too
280+
```bash
281+
chown ...
249282
```
250283
251284
Loading

operating-systems/windows/tools/hashcat-win.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Hashcat
22

3-
> - Check my entire guide to Windows, Linux and VM Hashcat installation and test [here](../../home-lab/redteam/lab_hashcat.md).
3+
> - Check my entire guide to Windows, Linux and VM Hashcat installation and test [here](../../../home-lab/redteam/lab-hashcat.md).
4+
5+
---
46

57
## Windows Installation
68

@@ -14,6 +16,8 @@
1416

1517
![](.gitbook/assets/image-20220810212037493.png)
1618

19+
---
20+
1721
## Usage
1822

1923
- Run Windows Powershell:

operating-systems/windows/tools/vagrant-win.md

+38-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Vagrant
22

3+
![vagrantup.com](.gitbook/assets/vagrantup-logo.png)
4+
5+
---
6+
7+
## 🌐 Resources 🔗
8+
39
> - [Vagrant Installation](https://developer.hashicorp.com/vagrant/docs/installation)
410
> - [Download](https://developer.hashicorp.com/vagrant/downloads) and Run the installer for Windows system.
511
> - The installer will automatically add `vagrant` to your system path so that it is available in terminals.
@@ -9,10 +15,12 @@
915
> - Vagrant is meant to run with one Vagrantfile per project.
1016
> - When you run any `vagrant` command, Vagrant climbs up the directory tree looking for the first Vagrantfile it can find, starting first in the current directory.
1117
> - This feature lets you run `vagrant` from any directory in your project.
12-
> - Find more boxes at [HashiCorp's Vagrant Cloud box catalog](https://vagrantcloud.com/boxes/search)
18+
> - Find more boxes at [HashiCorp's Vagrant Cloud box catalog](https://portal.cloud.hashicorp.com/vagrant/discover)
1319
1420
![](.gitbook/assets/image-20230201220702304.png)
1521

22+
---
23+
1624
## Default Provider
1725

1826
- *If you have the VMware provider installed, it will always take priority over VirtualBox.*
@@ -29,7 +37,7 @@ Vagrant.configure("2") do |config|
2937
end
3038
```
3139

32-
40+
---
3341

3442
## VirtualBox
3543

@@ -51,7 +59,7 @@ vagrant init hashicorp/bionic64
5159
vagrant box add hashicorp/bionic64
5260
```
5361

54-
> This will download the box named `hashicorp/bionic64` from [HashiCorp's Vagrant Cloud box catalog](https://vagrantcloud.com/boxes/search), where you can find and host boxes.
62+
> This will download the box named `hashicorp/bionic64` from [HashiCorp's Vagrant Cloud box catalog](https://portal.cloud.hashicorp.com/vagrant/discover), where you can find and host boxes.
5563
>
5664
> Boxes are globally stored for the current user. Each project uses a box as an initial image to clone from, and never modifies the actual base image. This means that if you have two projects both using the `hashicorp/bionic64` box you just added, adding files in one guest machine will have no effect on the other machine.
5765
@@ -135,16 +143,19 @@ vagrant box remove hashicorp/bionic64
135143
vagrant halt
136144
```
137145
138-
146+
147+
---
139148
140149
## VMware Workstation
141150
142-
- Install VMware
151+
- [Install VMware](../../../home-lab/hypervisors/vmware/vmware-workstation.md)
143152
- To upgrade the Vagrant VMware utility, download the latest version from the [Vagrant VMware utility downloads page](https://developer.hashicorp.com/vagrant/downloads/vmware) and install the system package to your local system.
144153
- You can install or update the Vagrant VMware plugin to the latest version by re-running the install command:
145154
146155
```powershell
147156
vagrant plugin install vagrant-vmware-desktop
157+
158+
vagrant plugin update
148159
```
149160
150161
![](.gitbook/assets/image-20230201211135873.png)
@@ -204,3 +215,25 @@ vagrant destroy
204215
205216
------
206217
218+
## 📝 Cheatsheet
219+
220+
```powershell
221+
vagrant plugin install vagrant-vmware-desktop
222+
vagrant plugin update
223+
224+
vagrant init <IMAGE>
225+
vagrant up
226+
vagrant up --provider=vmware_desktop
227+
vagrant ssh
228+
229+
vagrant suspend
230+
vagrant halt
231+
vagrant destroy
232+
233+
vagrant box list
234+
vagrant box remove <BOX_NAME>
235+
236+
```
237+
238+
---
239+

0 commit comments

Comments
 (0)