Help updating a user in openldap

ChrisA

New Member
Joined
Mar 30, 2021
Messages
3
Reaction score
1
Credits
31
Hi all, please forgive my lack of knowledge as I am learning Linux from scratch using the Pluralsight EX200 exam course notes (yes, probably way over my head, but this is what my manager gave me as a task...)

I am going through the openldap sections and I have created an ldap user using an ldif file, the contents of which are:

dn: uid=sally,ou=people,dc=example,dc=com
uid: sally
cn: sally
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword::
shadowMin: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bashp
uidNumber: 4001
gidNumber: 4000
homeDirectory: /home/sally
gecos: sally bloggs

Then ran the script ldapadd -x -W -D cn=Manager,dc=example,dc=com -f newuser.ldif

I made an error on the login shell line when editing the file and you will see I put /bin/bashp, so now when I try to su - sally, I get an error 'failed to execute /bin/bashp'

What is the easiest way for me to fix this issue? Thanks in advance
 


I have no experience with ldap but I think you should be able to use ldapmodify(at the bottom of the page).
 
Hi, thanks for your reply, I tried and got the following:

[root@server2 ~]# ldapmodify -f newuser.ldif
ldap_sasl_interactive_bind_s: No such attribute (16)

(I updated the ldif file to remove the 'p' from the end of bash)
 
Other option is to just delete the user and create a new one using the file with the removed typo?
 
Hi, I ended up downloading jxplorer for windows and connecting to my ldap as admin, which meant it was very easy to correct the users bash LDAP field. Thanks for your time
 

Members online


Latest posts

Top