Quick Review: Boxee Box
December 27, 2011 – 12:22 am | 3 Comments

Some of the technical issues with Boxee Box could have been fixed if the dev team was paying more attention to addressing the bugs rather than adding “features” of dubious value. In the final analysis, for the price and ease of use, Boxee Box is the best in its class and price range. You just need to be mindful of its limitations and buy it in hope of future improvements to its usability.

Read the full story »
Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Commands & Shells

Substitute Commands Depending on User ID

Submitted by on September 9, 2010 – 2:44 pmNo Comment
Substitute Commands Depending on User ID

Here is a quick example of how to substitute system commands based on who tries to run them. A customer of mine has recently deployed a security audit application on his servers. The application has a few bugs that the vendor has not yet resolved.

For example, the security audit agent looks at the output of the “mount” command to see if any filesystems are mounted without the “nosuid” option. However, there is a bug in the audit tool and it fails to exclude certain filesystems where “nosuid” option should not be used.

Until the problem with the audit tool is fixed, we wanted to disable this particular test on per-server basis. This could not be done centrally from the audit application and had to be done locally on each client node.

The idea was simple: the audit tool runs under “bigbro” username and we wanted the “mount” command to behave differently for that user.

Step one was to move /bin/mount to /bin/mount_orig. Then we created a new /bin/mount containing the following shell script:

#!/bin/sh
if [ `id -un` == "bigbro" ]
then
     echo ""
else
     /bin/mount_orig $*
fi

Then we just chmod 755 /bin/mount and “bigbro” was no longer able to annoy us with false non-compliance reports. Very unprofessional, I know, but what’cha gonna do?

Popularity: 1% [?]

Related posts:

  1. Wget and User-Agent Header
  2. Linux User Activity Management
  3. Unix Commands Summary
  4. Executing commands with ‘find’

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.