Changing root password from stdin value
Hello, I'm trying to get some scripts working which would take a password from stdin and set it for root. In Linux "passwd --stdin" is used, in FreeBSD "pw mod user root -h 0". How would I do this in OpenBSD? Thanks, Lucian -- Sent from the Delta quadrant using Borg technology! Nux! www.nux.ro
Re: Changing root password from stdin value
Thanks, that worked great! Lucian -- Sent from the Delta quadrant using Borg technology! Nux! www.nux.ro - Original Message - > From: "Sébastien Marie" > To: "Nux!" > Cc: misc@openbsd.org > Sent: Thursday, 9 October, 2014 18:48:54 > Subject: Re: Changing root password from stdin value > On Thu, Oct 09, 2014 at 06:22:05PM +0100, Nux! wrote: >> Hello, >> >> I'm trying to get some scripts working which would take a password from stdin >> and set it for root. >> In Linux "passwd --stdin" is used, in FreeBSD "pw mod user root -h 0". How >> would >> I do this in OpenBSD? >> >> Thanks, >> Lucian >> > > Hi, > > You could use encrypt(1) + usermod(1). > > encrypt will encrypt passwords from the command line or standard input. > usermod will accept an already-encrypted password. > > -- > Sébastien Marie
openbsd "sysprep"?
Hi, I'm trying to build a Cloudstack OpenBSD template and I need to do a bit of cleaning up on it before I let people use it. Besides changing the password, wiping the shell history, ssh keys, random seed and /var/log stuff, what else should I be doing to trigger a more "unique" installation? Lucian -- Sent from the Delta quadrant using Borg technology! Nux! www.nux.ro
Live resize / filesystem?
Hello, Anyone knows is it's possible to live resize a partition and it's filesystem? I'm working on some OpenBSD cloud templates and I need them to be - among others - "self-resizable". I.e. the main template will be 8 or 10 GB whereas the destination disk may be larger than that; the OS should expand it's partition to match the entire disk. Regards, Lucian -- Sent from the Delta quadrant using Borg technology! Nux! www.nux.ro
Re: Live resize / filesystem?
Thanks guys, I was hoping for a more optimistic feedback, at least I know not to waste too much time on this. Lucian -- Sent from the Delta quadrant using Borg technology! Nux! www.nux.ro - Original Message - > From: "Otto Moerbeek" > To: "Nux!" > Cc: misc@openbsd.org > Sent: Monday, 13 October, 2014 18:26:45 > Subject: Re: Live resize / filesystem? > On Mon, Oct 13, 2014 at 07:22:58PM +0200, Otto Moerbeek wrote: > >> On Mon, Oct 13, 2014 at 04:13:50PM +0100, Nux! wrote: >> >> > Hello, >> > >> > Anyone knows is it's possible to live resize a partition and it's >> > filesystem? >> > I'm working on some OpenBSD cloud templates and I need them to be - among >> > others >> > - "self-resizable". I.e. the main template will be 8 or 10 GB whereas the >> > destination disk may be larger than that; the OS should expand it's >> > partition >> > to match the entire disk. >> >> Live fdisk abd disklabel updates are possible, but growing an existing > > Ugh, that should be "limited disklabel updates" > >> filesystem is not. Even growing an unmounted fileystem (using >> growsfs(8)) isn't as reliable as I would wish. >> > > -Otto
shutdown/reboot on acpi/qemu signals
Hello, I'm having an issue with my OpenBSD cloud instance in that it completely ignores the signals sent to it by qemu-kvm, so instead of getting shut down or rebooted gracefully it has to be "reset". Anyone hit this issue before and can advise on the matter? Thanks, Lucian -- Sent from the Delta quadrant using Borg technology! Nux! www.nux.ro
Re: Live resize / filesystem?
Otto, Thanks, but this will be a "cloud template", all other templates I'm building (linux, freebsd) expand partition and filesystem upon first boot, was hoping to achieve the same. Not sure how reinstall would help in this case, though I am open to any advice. Lucian -- Sent from the Delta quadrant using Borg technology! Nux! www.nux.ro - Original Message - > From: "Otto Moerbeek" > To: "Nux!" > Cc: misc@openbsd.org > Sent: Monday, 13 October, 2014 19:43:42 > Subject: Re: Live resize / filesystem? > On Mon, Oct 13, 2014 at 07:41:05PM +0100, Nux! wrote: > >> Thanks guys, I was hoping for a more optimistic feedback, at least I know >> not to >> waste too much time on this. > > Maybe just include bsd.rd and reinstall? > > -Otto
Re: shutdown/reboot on acpi/qemu signals
Giancarlo, Thanks, but for me it did not work, the guest fails to boot after this change. I'll wait for 5.6 for more serious work on KVM. Thanks! Lucian -- Sent from the Delta quadrant using Borg technology! Nux! www.nux.ro - Original Message - > From: "Giancarlo Razzolini" > To: "Nux!" , misc@openbsd.org > Sent: Monday, 13 October, 2014 19:51:45 > Subject: Re: shutdown/reboot on acpi/qemu signals > On 13-10-2014 15:42, Nux! wrote: >> I'm having an issue with my OpenBSD cloud instance in that it completely >> ignores >> the signals sent to it by qemu-kvm, so instead of getting shut down or >> rebooted >> gracefully it has to be "reset". >> Anyone hit this issue before and can advise on the matter? > Yes, this is a know issue. You need to disable mpbios on your kernel: > > config -ef /bsd > > ulc> disable mpbios > > ukc> quit > > This will permanently disable mpbios on your kernel. If you follow > current and recompile you kernel often, then you'll need to run this > command every time you install a new kernel. Reboot your system and > check if mpbios is disabled: > > dmesg | grep mpbios > > You should get this: > > mpbios at bios0 not configured > > Now you can try issue virsh shutdown of shutting it down from > virt-manager. It will also correctly shutdown the OpenBSD guest in the > event of a host shutdown. > > Cheers, > Giancarlo Razzolini
Re: Live resize / filesystem?
Alexander, Nice idea, better than getting stuck with same size. I know this is very relative, but which partition gets used most in OpenBSD in your experience? /var or /home? Lucian -- Sent from the Delta quadrant using Borg technology! Nux! www.nux.ro - Original Message - > From: "Alexander Hall" > To: "Nux!" , "Otto Moerbeek" > Cc: misc@openbsd.org > Sent: Tuesday, 14 October, 2014 00:13:14 > Subject: Re: Live resize / filesystem? > On 10/13/14 20:45, Nux! wrote: >> Otto, >> >> Thanks, but this will be a "cloud template", all other templates I'm >> building (linux, freebsd) expand partition and filesystem upon first >> boot, was hoping to achieve the same. Not sure how reinstall would >> help in this case, though I am open to any advice. > > Unless you really need a single large root partition, you can run > disklabel at first boot to create one or more partitions in the > unpartitioned space at the end of your disk. > > Sth like this in /etc/rc.firsttime: > > printf '%s\n' a p '' '' '' w q | sudo disklabel -E sd0 > echo '/dev/sd0p /data ffs rw,nodev,nosuid 1 2' >> /etc/fstab > > /Alexander > >> >> Lucian >> >> -- >> Sent from the Delta quadrant using Borg technology! >> >> Nux! >> www.nux.ro >> >> - Original Message - >>> From: "Otto Moerbeek" >>> To: "Nux!" >>> Cc: misc@openbsd.org >>> Sent: Monday, 13 October, 2014 19:43:42 >>> Subject: Re: Live resize / filesystem? >> >>> On Mon, Oct 13, 2014 at 07:41:05PM +0100, Nux! wrote: >>> >>>> Thanks guys, I was hoping for a more optimistic feedback, at least I know >>>> not to >>>> waste too much time on this. >>> >>> Maybe just include bsd.rd and reinstall? >>> >>> -Otto
Re: Live resize / filesystem?
Alexander, Yes, you've got a point. I'll think about it. Cheers, Lucian -- Sent from the Delta quadrant using Borg technology! Nux! www.nux.ro - Original Message - > From: "Alexander Hall" > To: "Nux!" > Cc: "Otto Moerbeek" , misc@openbsd.org > Sent: Tuesday, 14 October, 2014 00:29:38 > Subject: Re: Live resize / filesystem? > On 10/14/14 01:18, Nux! wrote: >> Alexander, >> >> Nice idea, better than getting stuck with same size. >> I know this is very relative, but which partition gets used most in OpenBSD >> in >> your experience? /var or /home? > > It depends. For a server, /var. For a workstation, probably /home. Both > of those should already be mounted at that time, though, so they are > probably not the easiest targets. > > I tend to add a larger /data, /bigtmp or /whatever, and then symlink > into it, potentially from various places. > > OTOH, if you cannot even say which one you need, why forcibly partition > and mount it? Just let it stay unpartitioned until really needed. > > Also please note that I forgot newfs + mount in my example. > > /Alexander > >> >> Lucian >> >> -- >> Sent from the Delta quadrant using Borg technology! >> >> Nux! >> www.nux.ro >> >> - Original Message - >>> From: "Alexander Hall" >>> To: "Nux!" , "Otto Moerbeek" >>> Cc: misc@openbsd.org >>> Sent: Tuesday, 14 October, 2014 00:13:14 >>> Subject: Re: Live resize / filesystem? >> >>> On 10/13/14 20:45, Nux! wrote: >>>> Otto, >>>> >>>> Thanks, but this will be a "cloud template", all other templates I'm >>>> building (linux, freebsd) expand partition and filesystem upon first >>>> boot, was hoping to achieve the same. Not sure how reinstall would >>>> help in this case, though I am open to any advice. >>> >>> Unless you really need a single large root partition, you can run >>> disklabel at first boot to create one or more partitions in the >>> unpartitioned space at the end of your disk. >>> >>> Sth like this in /etc/rc.firsttime: >>> >>> printf '%s\n' a p '' '' '' w q | sudo disklabel -E sd0 >>> echo '/dev/sd0p /data ffs rw,nodev,nosuid 1 2' >> /etc/fstab >>> >>> /Alexander >>> >>>> >>>> Lucian >>>> >>>> -- >>>> Sent from the Delta quadrant using Borg technology! >>>> >>>> Nux! >>>> www.nux.ro >>>> >>>> - Original Message - >>>>> From: "Otto Moerbeek" >>>>> To: "Nux!" >>>>> Cc: misc@openbsd.org >>>>> Sent: Monday, 13 October, 2014 19:43:42 >>>>> Subject: Re: Live resize / filesystem? >>>> >>>>> On Mon, Oct 13, 2014 at 07:41:05PM +0100, Nux! wrote: >>>>> >>>>>> Thanks guys, I was hoping for a more optimistic feedback, at least I >>>>>> know not to >>>>>> waste too much time on this. >>>>> >>>>> Maybe just include bsd.rd and reinstall? >>>>> > >>>> -Otto