1

in my Linux machine - red-hat

I successfully to login to different users as the following

su - userC
[machine@Linux ~]$ pwd
[machine@Linux ~]$ /Users/userC

but only in one user I get the following

su - UserA
Creating directory '/User/UserA'.
could not open session

please advice from where I get the message "could not open session"

what could be the problem ?

maihabunash
  • 443
  • 1
  • 11
  • 25
  • hi your right - from the log I sow that /User dir is missing in spite all other users exist under /Users dir not /User – maihabunash Dec 02 '14 at 20:45
  • but how it can be? why the log say that /User not exist while all other users are under /Users? , second I see that LDAP apears in the log - maybe we get wrong conf from LDAP ? – maihabunash Dec 02 '14 at 21:10
  • but where is the wrong = User in where configuration file? ( is this info comes from the LDAP ? ) – maihabunash Dec 02 '14 at 21:29

1 Answers1

1

An error message like "could not open session" is often the result from error in the authentication proces. In Linux is that the PAM stack, pluggable authentication Modules.

By default most distro's log authentication error messages in /var/log/secure. Start by checking there.

As discussed in chat: in this case the error originated from the pam_mkhomedir module that creates home directories for users when they log in for the first time and no home directory exists yet.

The base directory where the home directory is created must exist, in your case /Users/ but that single user that generates the error was incorrectly provisioned in the LDAP directory, with a home directory in /User/ missing the the plural s. Since that directory did not exist pam_mkhomedir failed and access was denied.

Solution: best is to correct the homeDirectory account property for that user in LDAP.
Work-around: simply create /User/.

HBruijn
  • 77,029
  • 24
  • 135
  • 201