About80Ninjas icon

Untitled

About80Ninjas | PRO | 06/28/25 08:44:33 PM UTC | 0 ⭐ | 11948 šŸ‘ļø | Never ā° | []
Bash |

860 B

|

Source Code

|

0 šŸ‘

/

0 šŸ‘Ž

#!/bin/bash
Ā 
# This script prepares a flash drive for a headless Raspberry Pi setup.
Ā 
# --- Configuration ---
# Replace with your desired username
USERNAME="pi"
# Replace with your desired password
PASSWORD="raspberry"
# Replace with your Wi-Fi SSID
WIFI_SSID="YOUR_WIFI_SSID"
# Replace with your Wi-Fi password
WIFI_PASSWORD="YOUR_WIFI_PASSWORD"
Ā 
# --- Script ---
Ā 
# Create userconf.txt for username and password
echo "$USERNAME:$(echo $PASSWORD | openssl passwd -6 -stdin)" > userconf.txt
Ā 
# Create wpa_supplicant.conf for Wi-Fi
cat > wpa_supplicant.conf << EOL
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
Ā 
network={
Ā  Ā  ssid="$WIFI_SSID"
Ā  Ā  psk="$WIFI_PASSWORD"
}
EOL
Ā 
# Enable SSH
touch ssh
Ā 
echo "Setup complete. Please copy all generated files to the boot partition of your Raspberry Pi's SD card."
Ā 

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    šŸ‘

    /

    šŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    šŸ‘

    /

    šŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    šŸ‘

    /

    šŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    šŸ‘

    /

    šŸ‘Ž

    
        
  • About80Ninjas icon
    04/06/26 12:23:28 AM UTC
    Plain Text |

    0 B

    |

    šŸ‘

    /

    šŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    šŸ‘

    /

    šŸ‘Ž