It’s time again for a new release of Landscape. This release brings an exciting new feature and an important client fix that may be affecting some computers.
The new feature we introduced with this release is something customers have been asking us for some time now: script execution.
This means it’s now possible to write a script and have it run on any of the managed computers. The script is sent to the machines, executed there and the result is reported back to Landscape.
Script execution is disabled by default on the new Landscape client. In order to enable it, special steps have to be taken whether it’s an upgrade or a new installation.
WARNING: if you run landscape-config again after an upgrade, you can also enable script execution via the wizard. But you also risk re-registering your computer if you answer “Y” by accident to the last question about requesting a registration!
In order to enable script execution when doing an upgrade of the Landscape client, a change in the configuration file needs to be made. Please follow these steps:
- open a terminal
- run “sudo vi /etc/landscape/client.conf” (or use your favorite text editor)
- add the lines below, replacing <users-comma-separated> with a comma separated list of the users you want to allow to execute scripts sent by Landscape:
include_manager_plugins = ScriptExecution
script_users = <users-comma-separated>
For example, if you want to allow script execution for the local “nobody” and “dsa” users, you would write that line as:
script_users = nobody,dsa
- after making the changes, save the file and exit the editor
- now restart the client: run “sudo /etc/init.d/landscape-client restart”
For new installations, the procedure is a lot simpler. Just run the landscape-config wizard as usual and you will soon get to the script execution
part, which you can then enable and select the users you want to be able to run the scripts.
Here is a sample run:
Landscape has a feature which enables administrators to run
arbitrary scripts on machines under their control. By default this
feature is disabled in the client, disallowing any arbitrary script
execution. If enabled, the set of users that scripts may run as is
Enable script execution? [y/N]y
By default, scripts are restricted to the 'landscape' and
'nobody' users. Please enter a comma-delimited list of users
that scripts will be restricted to. To allow scripts to be run
by any user, enter "ALL".
Script users: nobody,dsa
The client fix is in the smart package, used by Landscape to resolve package dependencies. We noticed that some computers were not reporting any installed packages, which is odd. We were also getting some customer reports about a missing dependency in smart. Further investigation revealed that some Ubuntu computers had an RPM database installed.
When smart detects this database, it tries to use it. After all, one of the differentiating features of smart is that it is able to deal with many
different packaging and repository formats.
In order to use RPM, however, smart needs a new package called python-rpm. This dependency was not added to the smart because it’s really not usual, or t least we thought so, to have RPMs installed on an Ubuntu system. It turns out, however it’s not that uncommon.
So the new smart package is now able to work on a machine with RPM installed and without requiring the extra python-rpm package. Smart just ignores the RPM channel and keeps working.
That’s it! Thanks to everyone who reported problems and made suggestions for improvement!
- fix for a missing dependency for smart if an RPM database is detected on the system. This would prevent the reporting of packages to the Landscape server if python-rpm was also not installed
- landscape-config no longer displays the registration password
- added script execution support, disabled by default
- monitoring page can now display only selected graphs
- performance improvements for large numbers of user accounts
- other under the hood performance improvements
- support for script execution on the managed computers