LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-29-2015, 01:33 PM   #1
lpwevers
Member
 
Registered: Apr 2005
Location: The Netherlands
Distribution: SuSE, CentOS
Posts: 181

Rep: Reputation: 21
Using usermod with LDAP


Dear experts,

I'm faced with a challenge that I seem to be unable to solve. I actually don't know if it's possible at all, so hopefully one of you can provide the answer.

I've setup a bunch of servers with SLES 11SP3. One of these is configured to be an LDAP server for central user and group management on all the others. The others are going to serve as SAP servers.

Now here's the annoying bit. I've configured all the users and groups for SAP in LDAP. I've verified that authentication works, users can change their password, etc. However, during installation SAP will run something like
Code:
usermod -G "sapinst" sapuser
on the existing LDAP user. This results in the following error:
Code:
usermod: Cannot add user to groups stored in LDAP database without DN.
usermod: User not added to LDAP group `sapinst'.
On the command line I can bypass this by specifying the full DN using the -D option of usermod and then manually provding the password for the LDAP server. However, I cannot change the way the SAP installation program calls usermod.

So to cut a long story short, is there a way I pre-configure the DN / password so usermod will pick them up autmatically (e.g. without the -D option)? If so, that would really make my life easier.

Thanks.
Louis
 
Old 07-01-2015, 03:14 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
So to cut a long story short, is there a way I pre-configure the DN / password so usermod will pick them up autmatically (e.g. without the -D option)? If so, that would really make my life easier.
If I understand well what you're trying to accomplish, I'd say that you can use alias to create a custom usermod command alias containing the -D ... argument
Code:
alias usermod='usermod -D ...'
Regards
 
1 members found this post helpful.
Old 07-01-2015, 04:14 PM   #3
lpwevers
Member
 
Registered: Apr 2005
Location: The Netherlands
Distribution: SuSE, CentOS
Posts: 181

Original Poster
Rep: Reputation: 21
Quote:
Originally Posted by bathory View Post
If I understand well what you're trying to accomplish, I'd say that you can use alias to create a custom usermod command alias containing the -D ... argument
Code:
alias usermod='usermod -D ...'
Regards
Thanks, that may be worth a try, if I can somehow manage to get the password for the bind DN in the alias as well. I was already a bit afraid that it would come down to using an alias or building a wrapper around usermod.
 
  


Reply

Tags
ldap, usermod



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what the difference between usermod -G usermod -g LittleMaster Linux - Newbie 3 10-09-2012 03:26 AM
[SOLVED] usermod -a -G thesullster Linux - Newbie 1 09-28-2012 09:53 AM
usermod alexm21 Debian 4 02-20-2009 11:12 PM
Usermod carlosinfl Linux - General 8 09-19-2006 08:26 PM
usermod thelight1 Linux - Newbie 1 07-24-2003 12:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration