- Organized 252 files across project - Root directory: 187 → 2 files (98.9% reduction) - Moved configuration guides to docs/04-configuration/ - Moved troubleshooting guides to docs/09-troubleshooting/ - Moved quick start guides to docs/01-getting-started/ - Moved reports to reports/ directory - Archived temporary files - Generated comprehensive reports and documentation - Created maintenance scripts and guides All files organized according to established standards.
3.3 KiB
3.3 KiB
Set Root Password from pve2 Console
Container: VMID 5000 (blockscout-1)
Password: L@kers2010
Node: pve2
Method 1: Using pct enter (Recommended)
Step 1: Access pve2 Node
# SSH to Proxmox host first (if needed)
ssh root@192.168.11.10
# Then SSH to pve2 node
ssh pve2
Step 2: Enter Container Console
# Enter the container console
pct enter 5000
Step 3: Set Root Password
Once inside the container:
# Set password interactively
passwd root
When prompted:
- Enter new password:
L@kers2010 - Retype new password:
L@kers2010
Expected output:
New password: [enter L@kers2010]
Retype new password: [enter L@kers2010]
passwd: password updated successfully
Step 4: Exit Container
# Exit container console
exit
Method 2: Using pct exec with chpasswd (One-liner)
From pve2 node console:
# Set password using chpasswd (non-interactive)
pct exec 5000 -- bash -c 'echo "root:L@kers2010" | chpasswd'
Expected output:
# No output means success
Method 3: Using pct exec with passwd (Non-interactive)
From pve2 node console:
# Set password using passwd with stdin
pct exec 5000 -- bash -c 'echo -e "L@kers2010\nL@kers2010" | passwd root'
Expected output:
New password: Retype new password: passwd: password updated successfully
Complete Command Sequence
From your local machine:
# Option A: Two-step SSH (if pve2 is not directly accessible)
ssh root@192.168.11.10 "ssh pve2 'pct exec 5000 -- bash -c \"echo root:L@kers2010 | chpasswd\"'"
From Proxmox host (192.168.11.10):
# SSH to pve2
ssh pve2
# Set password
pct exec 5000 -- bash -c 'echo "root:L@kers2010" | chpasswd'
# Verify (optional)
pct exec 5000 -- bash -c 'su - root -c "echo Password set successfully"'
Directly from pve2 console:
# Single command
pct exec 5000 -- bash -c 'echo "root:L@kers2010" | chpasswd'
Verification
After setting the password, verify it works:
# Test SSH access (from pve2 or any host)
ssh root@192.168.11.140
# Enter password: L@kers2010
# Or test from within container
pct exec 5000 -- bash -c 'su - root -c "whoami"'
# Should output: root
Troubleshooting
If pct enter doesn't work:
# Check container is running
pct status 5000
# If stopped, start it first
pct start 5000
If pct exec fails:
# Verify container exists and is running
pct list | grep 5000
# Check container permissions
ls -la /etc/pve/nodes/pve2/lxc/5000.conf
If password contains special characters:
The password L@kers2010 contains @ which may need escaping in some shells. The chpasswd method handles this correctly, but if issues occur:
# Use single quotes to prevent shell interpretation
pct exec 5000 -- bash -c 'echo "root:L@kers2010" | chpasswd'
# Or escape the @ symbol
pct exec 5000 -- bash -c "echo 'root:L@kers2010' | chpasswd"
Quick Reference
Easiest method (one command from pve2):
pct exec 5000 -- bash -c 'echo "root:L@kers2010" | chpasswd'
Interactive method (if you prefer confirmation):
pct enter 5000
passwd root
# Enter password twice when prompted
exit
Last Updated: $(date)