Why 'groups' command shows different result in 'cron' and interactive in NIS environment?

Solution Verified - Updated -

Issue

  • Command groups shows differences in cron, at and CLI.
    When groups is run from the command line expected list of groups is displayed:
$ groups
testuser nisgroup1 nisgroup2 nisgroup3

When command groups is run from at or cron for the same user, the result lacks the NIS groups:

Date: Mon, 16 Mar 2015 13:28:34 +0100
From: testuser@server
To: testuser@server
Subject: Output from your job       10

testuser

Environment

  • Red Hat Enterprise Linux 5.11
  • NIS server
  • NIS client
  • at daemon
  • cron daemon

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content