I've been absent from this thread for quite a while, but I have been corresponding directly with our team leader for the Ama-gi project, MAFoElffen.
Anyway, in the meantime I have thought about users without elevated permissions, and about curious users, who might try what happens when sudo errors out or it quit by ctrl+c. Our system-info script can perform badly in such situations. You can try it yourself.
At first I wanted to make it impossible to run without sudo (which is fairly easy unless the user edits the script). But then I figured it should be possible to let the user run the script without sudo in a controlled way (but of course let the user understand, that it is better to let the script use sudo, when it wants to and when it is possible).
The following report files from an Ubuntu Server 20.04.3 LTS illustrate what information that can still be collected by the script without sudo and what information that needs sudo to be collected.
- Report with sudo
- Report without sudo
I took the opportunity to polish the user interface too, things that you may not consider important, but that might help a new Ubuntu user cope with our script.
Because of previous difficulties to show patch files, I will instead attach a tarball with 'my' version system-info.13-niofix plus a patch file from the current version at https://github.com/Mafoelffen1/system-info/ so that it will be easy for you to see what has been added/changed.
Code:
$ ./system-info.13 -v
Version: 01.00-01, Script Date: 2021.09.30
$ md5sum testing/system-info.13 system-info.13-niofix
4f16b2cb4357e0189460bfdf9d7eb52a testing/system-info.13
e5b356cabefe4e7a23f8464a50ffa0d1 system-info.13-niofix
You are welcome to test and decide if this extra feature (to run without sudo) is worthwhile to include in the official version. You may find bugs. Whatever you think or find, please give feedback
Example 1, This is how the user is greeted when selecting --nosudo, screen hight-light and faint video emulated,
Code:
$ ./system-info.13-niofix --nosudo
<clear screen>
Running Script: system-info.13-niofix Version: 01.00-01, Script Date: 2021.09.30
without sudo: getting best possible but limited information
--- Some Programs Were Missing ---
"mokutil" could not be found. This program is suggested.
If this is older hardware that is 'Legacy Only BIOS' then this can be ignored.
-------------------------------------------------------------------------------
The Script 'system-info' uses some very basic Linux utilities.
Some of these utilities were not found.
<E>xit and install the program(s) or <C>ontinue anyway? <E/C>
Example 2, New help text high-lighted here (not high-lighted on the text screen or in the terminal window),
Code:
$ ./system-info.13-niofix --help
-------------------------------------------------------------------------
Running Script: system-info.13-niofix Version: 01.00-01, Script Date: 2021.09.30
md5sum: e5b356cabefe4e7a23f8464a50ffa0d1
Description: The Ubuntu Forums "system-info" script queries the user's
computer and prepares a report, so that Ubuntu Forums Community Members
can see what they are recommending solutions for.
Usage: ./system-info.13-niofix <option>
Options:
-v Returns Version Information and exits.
-h or --help Displays this Help Screen, then exits.
-n or --nosudo Run the script without sudo.
-s # or --show # Changes Verbosity levels of the logger.
# range 0 through 5
Example: system-info -s 5 turns on debugging messages
Parts of the script want elevated permissions, 'sudo', while other parts
work better without it. Do not prefix with sudo, but enter your userID's
password, when asked for it when the script is running.
Asks the user 2 questions to describe the problem they are having, then
creates system-info.13-niofix.txt in their Home directory.
Will check programs used by this script, and give the user the option to
quit to install anything it finds missing. Will give the user the option
to upload the report to a pastebin and displays the URL of that to add
their post on Ubuntu Forums.
Or they can manually paste the report within code tags in a post or to a
pastebin. Or added as a text attachment to a post.
We have tried to keep this safe and simple to use.
Bookmarks