ZOSOpenTools / meta

Meta repository to tie together the various underlying z/OS Open Source tools repositories here
https://zosopentools.github.io/meta/
Apache License 2.0
37 stars 25 forks source link

sudo and others that present post installation notes #688

Open lbdyck opened 4 months ago

lbdyck commented 4 months ago

used zopen to install sudo and it would not work - reported

/sudo must be owned by uid 0 and have the setuid bit set

The installer should be aware of this requirement - shouldn't it?

lbdyck commented 4 months ago

Or should zopen install and zopen upgrade be run as superuser?

lbdyck commented 4 months ago

ok - I looked at the install for sudo and it has this


IMPORTANT NOTE: Installation of sudo is NOT COMPLETE.
For details on sudo, see: https://www.sudo.ws/releases/stable/#1.9.13p3
To finish installing sudo, run the following commands with elevated privileges:
BIN_SUDO='cvtsudoers sudo sudoedit sudoreplay'
SBIN_SUDO='sudo_logsrvd sudo_sendlog visudo'
SUDO_INSTALL_LOCAL=/home/splbd/zopen/usr/local/zopen/sudo/sudo-1.9.13p3.20231110_104125.zos
cd $SUDO_INSTALL_LOCAL/bin
cp $BIN_SUDO /usr/bin/
cd $SUDO_INSTALL_LOCAL/sbin
cp $SBIN_SUDO /usr/sbin/
cd /usr/bin
chown 0:0 $BIN_SUDO
cd /usr/sbin
chmod u+s $SBIN_SUDO
Review the $SUDO_INSTALL_LOCAL/etc/sudoers file.
Use visudo to create your own /etc/sudoers file.

This was lost among the dozen plus install packages and only because I scrolled back - this information, and any others like this, need to be more prominently presented to the user.

lbdyck commented 4 months ago

and will zopen promote support this as well?

IgorTodorovskiIBM commented 4 months ago

ok - I looked at the install for sudo and it has this


IMPORTANT NOTE: Installation of sudo is NOT COMPLETE.
For details on sudo, see: https://www.sudo.ws/releases/stable/#1.9.13p3
To finish installing sudo, run the following commands with elevated privileges:
BIN_SUDO='cvtsudoers sudo sudoedit sudoreplay'
SBIN_SUDO='sudo_logsrvd sudo_sendlog visudo'
SUDO_INSTALL_LOCAL=/home/splbd/zopen/usr/local/zopen/sudo/sudo-1.9.13p3.20231110_104125.zos
cd $SUDO_INSTALL_LOCAL/bin
cp $BIN_SUDO /usr/bin/
cd $SUDO_INSTALL_LOCAL/sbin
cp $SBIN_SUDO /usr/sbin/
cd /usr/bin
chown 0:0 $BIN_SUDO
cd /usr/sbin
chmod u+s $SBIN_SUDO
Review the $SUDO_INSTALL_LOCAL/etc/sudoers file.
Use visudo to create your own /etc/sudoers file.

This was lost among the dozen plus install packages and only because I scrolled back - this information, and any others like this, need to be more prominently presented to the user.

Good point, we should probably capture important messages like this and print them out at the end, especially when doing an install of many tools.

Brew has the notion of "caveats': https://github.com/Homebrew/homebrew-core/blob/ba3e4e7ad9242717b5ecd1b327b1b82f9c4832c9/Formula/y/yarn.rb#L30-L35

I did a brew install of yarn and gdb and it does indeed print them out at the end:

==> Caveats
==> gdb
gdb requires special privileges to access Mach ports.
You will need to codesign the binary. For instructions, see:

  https://sourceware.org/gdb/wiki/PermissionsDarwin
==> yarn
yarn requires a Node installation to function. You can install one with:
  brew install node