Re: sudo and cloud images

From: Gonéri_Le_Bouder <goneri_at_lebouder.net>
Date: Sat, 03 Jan 2026 18:32:46 UTC
Thank you Eduardo,

So, you log-in the VM and use su to become root. You need the root password for that. This is the part that confuses me because the user_data file becomes mandatory to set the root password, which is a bit counter intuitive.

On Sat, Jan 3, 2026, at 07:24, Eduardo Lemos de Sa wrote:
> Dear Generi
> 
> Eduardo Lemos de Sa
> Professor Titular
> Dep. Quimica da Universidade Federal do Paraná
> fone: +55(41)3361-3300
> fax:   +55(41)3361-3186
> 
> Em sex., 2 de jan. de 2026 22:02, Gonéri Le Bouder <goneri@lebouder.net> escreveu:
>> __
>> Hi,
>> 
>> I maintain a pet-project where I provide FreeBSD images with Cloud-Init. I've been doing this for a couple years and I'm happy to see this is something FreeBSD support natively now. I like the nuageinit approach, is simple and straightforward.
>> 
>> I'm testing the FreeBSD 15 cloud image and sudo is not installed by default, which is a decision I understand. What is the "correct" way to get root privileges? Do you use a user_data file to set a root password, and just use "su"? If so, what the point of the password, it sounds like some extra complexity.
> 
> 
> I install sudo using pkg install sudo (check the sudo version) ou using porta (security/sudo).
> 
> After installed It, it need tô edit /usr/local/etc/ sudoers aiming to set which users can run sudo (search by root user settings and copy copy the LINE).
> 
> 
> Best regatas
> 
> Eduardo 
> 
>> 
>> Regards,
>> -- 
>>        Gonéri Le Bouder