My RHEL 6.6 VM is running behind Centrify Active Directory.

When I do

sudo id 'any_existing_user'

it will give back info about that user.

But when I do

sudo usermod -c 'Comments' 'any_existing_user'

it will reports error that 'any_existing_user' does not exist.

Could someone help me analyze why this is happening?

PS: I am not simply adding comments for fun, I trace down this issue when installing important packages.

  • 3
    You'll need to edit the "gecos" entry in their AD profile, now that the system is Centrified – Jeff Schaller Aug 26 '15 at 20:41

usermod is a tool for modifying the local /etc/passwd database. It cannot be used to modify accounts delivered through Active Directory.

id on the other hand looks up any user account regardless of its source. (Actually this is controlled with the passwd setting in nsswitch.conf but if you have integrated AD you'll be using multiple sources.)

As mentioned by others in the comments here, if you want to update the GECOS comments field for an AD account you'll need to do that within AD.

  • 2
    came here to say this; usermod edits /etc/passwd while id follows getpwent -> /etc/nsswitch.conf -> Centrify – Jeff Schaller Aug 26 '15 at 20:40
  • Do we know they're editing an AD account and not one of the local accounts? – Bratchley Aug 26 '15 at 21:17
  • @Bratchley not for sure, no. Answer extended. Please feel free to extend it further if you feel you can add value. – roaima Aug 26 '15 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.