New issue
Advanced search Search tips

Issue 864997 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Chromad: Have a clear message to user about existing machines

Project Member Reported by rsorokin@chromium.org, Jul 18

Issue description

Now when user tries to join device with a name that already exists they could get "Can't join the device to the domain. Check your account to make sure you have privileges to add devices" if they don't have rights to modify that machine account on the server. We could probably make it more clear for them.
 
I reproduced the error by trying to move an existing device around using a non-admin account. The net join message is

"Failed to join domain: failed to precreate account in ou ou=Chromad Dev Devices,ou=Chromad Dev,dc=<DEVICE_REALM>,dc=<DEVICE_REALM>: Constraint violation"

This maps to ERROR_OU_ACCESS_DENIED, which maps to 

"Can't join the device to the domain. Check your account to make sure you have privileges to add devices."

I'll map Constraint violation to a different error.

Cc: ibezmenov@chromium.org
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/system_api/+/78d910462f762d6abfdfc6d3d3ada185a47be2c1

commit 78d910462f762d6abfdfc6d3d3ada185a47be2c1
Author: Lutz Justen <ljusten@chromium.org>
Date: Thu Jul 19 13:12:26 2018

authpolicy: Add ERROR_OU_CONSTRAINT_VIOLATION

The error is use to improve the error message in Chrome when an
unprivileged user tries to join a device with a machine name that
already exists elsewhere.

BUG=chromium:864997
TEST=Tested on device

Change-Id: I6c407cd04fb60712b00f2653d12f204c4758982b
Reviewed-on: https://chromium-review.googlesource.com/1141955
Commit-Ready: Lutz Justen <ljusten@chromium.org>
Tested-by: Lutz Justen <ljusten@chromium.org>
Reviewed-by: Roman Sorokin <rsorokin@chromium.org>

[modify] https://crrev.com/78d910462f762d6abfdfc6d3d3ada185a47be2c1/dbus/authpolicy/active_directory_info.proto

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/977874a71cd3c6264ea79e2b18dde689c92a27d5

commit 977874a71cd3c6264ea79e2b18dde689c92a27d5
Author: Lutz Justen <ljusten@chromium.org>
Date: Thu Jul 19 13:12:27 2018

authpolicy: Return separate error for constraint violation

Returns a separate error code for a constraint violation while setting
OU for domain join. This happens when an unprivileged user tries to join
a device with a machine name that already exists elsewhere. The error is
use to improve the error message in Chrome.

CQ-DEPEND=CL:1141955

BUG=chromium:864997
TEST=Tested on device

Change-Id: Ibece7e805aaa61feeab398a491203ddd9d1e4fbd
Reviewed-on: https://chromium-review.googlesource.com/1141956
Commit-Ready: Lutz Justen <ljusten@chromium.org>
Tested-by: Lutz Justen <ljusten@chromium.org>
Reviewed-by: Roman Sorokin <rsorokin@chromium.org>

[modify] https://crrev.com/977874a71cd3c6264ea79e2b18dde689c92a27d5/authpolicy/samba_interface.cc

Owner: rsorokin@chromium.org
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 31

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/autotest-private/+/667096d5b860ff3b0bc2e89d676982ab6e0b9944

commit 667096d5b860ff3b0bc2e89d676982ab6e0b9944
Author: Lutz Justen <ljusten@chromium.org>
Date: Tue Jul 31 14:15:46 2018

Sign in to add a comment