Authentication is one of the internal
feature available in Jenkins. Jenkins does have its own internal database for
holding user name and passwords. Jenkins also provides a way to allow login
using underlying operating system usernames. This will allow users to login
using their system login credentials. This uses Pluggable Authentication Modules
(PAM), and also works fine with NIS.
1. In order to do this, first change the
permission for the /etc/shadow file so that jenkins user can read them. This is
since jenkins server is running using the jenkins userID
chmod g+r /etc/shadow
2. Now add root group to jenkins
[root@ip-10-149-198-16 jenkins]# usermod -a
-G root jenkins
[root@ip-10-149-198-16 jenkins]# groups
jenkins
jenkins : jenkins root
3. Once the above changes are done,
login to jenkins server with the admin
account and in manage jenkins, select
“unix user/groups” as authentication area
Once
done , logout and you can login using an user name and password from unix
machinesThis is how we can use our existing system credentials to login to jenkins server
No comments :
Post a Comment