change hostname and password of the firewall in build

Started by Vharry, October 09, 2023, 08:25:37 AM

Previous topic - Next topic
For my opnsense firewall I was trying to include my custom name as a hostname like, vharry.localdomain. Does anyone knows which variable to change in which repository, so that I can get my custom name as hostname after installing the ISO.

Also, I wanted to change the default password. Kindly Help me to achieve this.

System: Settings: General. First two options are host name and domain name.

System: Access: Users. Push  the edit button to change root password.
OPNsense HW:

Minisforum Venus series UN100C, 16 GB RAM, 512 GB SSD
T-bao N9N Pro, 16 GB RAM, 512 GB SSD

Thanks for your quick response almodovaris,
Actually I need to change the hostname of the machine at the time of build. So that I can get those changes in my ISO. Please help on how can I achieve this. Which repository creates the Hostname and password for the firewall?

Thanks!

It's in the file /usr/local/etc/config.xml in the generated installation. Probably the source for that is:

https://github.com/opnsense/core/blob/master/src/etc/config.xml.sample
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Thank you Patrick!

I checked changing the hostname and hashed password from line 206 of config.xml.sample, but it didn't work. Please let me know if you are aware of any other file or step in the process.

Thanks,
Vivek