Home directory Error oddjob-mkhomedir not working
Situation:While login as user, getting Error oddjob-mkhomedir not working
Solution:
1. yum install dbus oddjob oddjob-mkhomedir
2. service restart messagebus
3. service restart oddjob
4. Add the line "session required pam_oddjob_mkhomedir.so" to /etc/pam.d/sshd file
5. Delete a users home directory (rm -rf /home/nskselvan)
6. Disable and enable the "Use LDAP Authentication" in authconfig-tui (authconfig-tui - an interface for configuring system authentication resources)
7. Log in using ssh as this user.
[root@testserver ~]# yum install dbus oddjob oddjob-mkhomedir
Setting up Install Process
Package 1:dbus-1.2.24-8.0.1.el6_6.x86_64 already installed and latest version
Package oddjob-0.30-5.el6.x86_64 already installed and latest version
Package oddjob-mkhomedir-0.30-5.el6.x86_64 already installed and latest version
Nothing to do
[root@testserver ~]# service messagebus restart
Stopping system message bus: [ OK ]
Starting system message bus: [ OK ]
[root@testserver ~]# chkconfig messagebus on
[root@testserver ~]# /etc/init.d/oddjobd status
oddjobd is stopped
[root@testserver ~]# /etc/init.d/oddjobd restart
Shutting down oddjobd: [FAILED]
Starting oddjobd: [ OK ]
[root@testserver ~]# /etc/init.d/oddjobd restart
Shutting down oddjobd: [ OK ]
Starting oddjobd: [ OK ]
[root@testserver ~]# chkconfig oddjobd on
[root@testserver ~]# cat /etc/pam.d/sshd | grep -i pam_oddjob_mkhomedir.so
#%PAM-1.0
session required pam_oddjob_mkhomedir.so
[root@testserver ~]# authconfig-tui
Here, disable (unselect) the Use LDAP Authentication and save
[root@testserver ~]# authconfig-tui
Here, Enable (Select) the Use LDAP authentication and save. The result will be like below.
Starting nscd: [ OK ]
Starting nslcd: [ OK ]
No comments:
Post a Comment