Bug 175544 - net/samba36: "net ads join -k" fails when LOGNAME env is not set
Summary: net/samba36: "net ads join -k" fails when LOGNAME env is not set
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Timur I. Bakeyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-24 13:10 UTC by d.y.kazarov
Modified: 2013-01-31 15:16 UTC (History)
0 users

See Also:


Attachments
file.diff (538 bytes, patch)
2013-01-24 13:10 UTC, d.y.kazarov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description d.y.kazarov 2013-01-24 13:10:00 UTC
su command with full login simulation ("-l" or "-" option) clears
LOGNAME environment. The absence of LOGNAME environment makes "net ads join -k"
to use 'anonymous' connections to domain controller and the joining fails.

# kinit domadmin
domadmin@DOMAIN.LOC's Password:
# unset LOGNAME
# net ads join -k
Failed to join domain: failed to join domain 'DOMAIN.LOC' over rpc: Access
denied
# export LOGNAME=root
# net ads join -k
Using short domain name -- DOMAIN
Joined 'HOSTNAME' to realm 'domain.loc'

It's really not a problem to set the LOGNAME environment, but importance of
this environment is not documented and 'net' issues no warning so it's very
hard to find a source of a problem.

Attached patch adds such warning.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-01-24 14:08:53 UTC
Responsible Changed
From-To: freebsd-ports-bugs->timur

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Timur I. Bakeyev freebsd_committer freebsd_triage 2013-01-31 15:16:07 UTC
State Changed
From-To: open->closed

Committed. Thanks!