Univention Bugzilla – Bug 32169
"su - $user" fails after making home directory via univention-mount-homedir
Last modified: 2021-05-14 15:42:22 CEST
[Ticket #2013061221001009] UCS Video Training I created a user and tried "su - $user" when logged in as Administrator to switch to the new user, which fails on the first try, but succeeds on the second try: Administrator@mas11:~$ LANG=C su - hahn Password: Creating directory '/home/hahn'. su: System error Administrator@mas11:~$ LANG=C su - hahn Password: hahn@mas11:~$ I can repeat the error by deleting the $HOME of that user. The error does not happen with "ssh $user@host". From /var/log/auth.log Aug 6 16:50:36 mas11 su[2000]: Successful su for hahn by Administrator Aug 6 16:50:36 mas11 su[2000]: + /dev/pts/0 Administrator:hahn Aug 6 16:50:36 mas11 su[2000]: pam_unix(su:session): session opened for user hahn by Administrator(uid=2002) Aug 6 16:50:37 mas11 su[2000]: pam_open_session: System error Aug 6 16:50:45 mas11 su[2052]: Successful su for root by Administrator Aug 6 16:50:45 mas11 su[2052]: + /dev/pts/0 Administrator:root Aug 6 16:50:45 mas11 su[2052]: pam_unix(su:session): session opened for user root by Administrator(uid=2002) It works when /etc/pam.d/common-session is changed to this: #session required pam_runasroot.so program=/usr/sbin/univention-mount-homedir session required pam_mkhomedir.so skel=/etc/skel umask=0066 May be a duplicate of Bug #17765
This issue has been filed against UCS 3. UCS 3 is out of the normal maintenance and many UCS components have vastly changed in UCS 4. If this issue is still valid, please change the version to a newer UCS version otherwise this issue will be automatically closed in the next weeks.
This issue has been filed against UCS 3.1. UCS 3.1 is out of maintenance and many UCS components have vastly changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen this issue. In this case please provide detailed information on how this issue is affecting you.
Happened on customer. Asking for a fix. Customer will soon upgrade to 4.3 so we should provide a fix for this version. By uncommenting the line as commented by phahn it works (as workaround).
See the following UCR variables and Bug #23637: - homedir/create - homedir/mount - homedir/mount/required Does it help?
By setting homedir/mount/required=false the issue goes away. Is this supposed to be a workaround or is it the fix for this bug?
IMHO the basic question is, why does univention-mount-homedir fail here? Is it a configuration problem of the user object or a code rubustness problem? Just a naive remark: maybe we should just switch the order of univention-mount-homedir and pam_mkhomedir?
This issue has been filed against UCS 4.3. UCS 4.3 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.