LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-08-2016, 03:09 AM   #1
vjn_bki
LQ Newbie
 
Registered: Oct 2014
Posts: 8

Rep: Reputation: Disabled
How to Create local user in LDAP enabled linux systems


Hi,

During my application install, I used to create a new group and a new user using the 'groupadd' and 'useradd' commands

groupadd my_group
useradd -r -s /sbin/nologin -g my_group my_user

But in one of the linux machines, where the LDAP is enabled (the LDAP server is not running on this machine, but it's configured for LDAP client), I find that the 'groupadd' and 'useradd' commands are adding the group and user into the LDAP and not as local user / group.

I didn't want to add the user/group to LDAP, as I actually needed a local user, who will be owning my applications config file and one of the process will be run using the new user. I don't thing that LDAP user's can be used for 'chown' commands to change the file ownerships.


On googling, I found that there is a 'luseradd' / 'lgroupadd' command which can add the user locally. But this tools are present in only RHEL by default. So on other distros like Ubuntu and SUSE, it' is not present by default and needs to be explicitly installed. So i can not rely on this 'luseradd'/'lgroupdadd' utilities.

I don't want to manually add the user and group in /etc/group and /etc/passwd file as it is a hack and it involves generating a unique group id and user id for my new group and user.

1) Is there any other alternative to add a local user which can be used across all linux distros ?

2) What is the best check to see if my machine is LDAP enabled ? I want to use this check to decide if I have to use 'useradd/groupadd' commands or not.

Any help on this will be of great help.

Thanks
VJN
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Cannot ping local systems - but local systems can access internet walterbyrd Linux - Networking 19 07-28-2013 06:23 AM
user in remote LDAP server to be used to authenticate Local Linux server saravananp Linux - Newbie 5 01-11-2011 09:02 PM
[SOLVED] Local group for LDAP user someshpr Linux - Newbie 4 09-14-2010 12:04 PM
ldap still requires local user to work sam_vde Linux - Networking 1 01-26-2007 01:07 PM
LDAP Authentication w/ Local User Information Adrian W Linux - Security 13 08-17-2004 11:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:32 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