Mounting NFS Directory as Home Directory under /home for Users using PAM.D and PAM_MOUNT
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Currently I am trying to mount NFS folder as home folder for my users via pam.d and pam_mount. Unfortunately, when I log into my machine I get stuck in spawn.c with following message:
(spawn.c:136): setting uid to user myusername
I configured my system (CentOS 7) as follow:
/etc/pam.d/system-auth
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth required pam_faildelay.so delay=2000000
auth sufficient pam_fprintd.so
auth sufficient unix.so nullok try_first_pass
auth optional pam_mount.so
auth requisite pam_succeed_if.so uid >= 1000 quiet_success
auth required pam_deny.so
account required pam_unix.so
account sufficient pam_localuser.so
account sufficient pam_succeed_if.so uid < 1000 quiet
account required pam_permit.so
password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok
password optional pam_mount.so
password requisite pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=
password required pam_deny.so
session optional pam_keyinit.so revoke
session required pam_limits.so
-session optional pam_systemd.so
session required pam_unix.so
session optional pam_mount.so
/etc/security/pam_mount.conf.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
<pam_mount>
<debug enable="1">
<volume fstype="fuse" path="sshfs#%(USER)@my-server:/my/path" mountpoint="/home/%(USER)" options="nonempty" />
<mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
<mntoptions require="nosuid,nodev" />
<logout wait="0" hup="no" term="no" kill="no" />
<mkmountpoint enable="1! remove="true" />
<fd0ssh>/usr/libexec/hxtools/fd0ssh</fd0ssh>
</pam_mount>
What is odd is if I change the mountpoint in my pam_mount.conf.xml to some where else than the usual home diretcroy e.g:
/etc/security/pam_mount.conf.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
<pam_mount>
<debug enable="1">
<volume fstype="fuse" path="sshfs#%(USER)@my-server:/my/path" mountpoint="/mnt/%(USER)" options="nonempty" />
<mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
<mntoptions require="nosuid,nodev" />
<logout wait="0" hup="no" term="no" kill="no" />
<mkmountpoint enable="1! remove="true" />
<fd0ssh>/usr/libexec/hxtools/fd0ssh</fd0ssh>
</pam_mount>
everything works fine. How does the configuration files need to be adopted so that pam_mount mount the directory directly under home ?
centos nfs pam home automounting
add a comment |Â
up vote
0
down vote
favorite
Currently I am trying to mount NFS folder as home folder for my users via pam.d and pam_mount. Unfortunately, when I log into my machine I get stuck in spawn.c with following message:
(spawn.c:136): setting uid to user myusername
I configured my system (CentOS 7) as follow:
/etc/pam.d/system-auth
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth required pam_faildelay.so delay=2000000
auth sufficient pam_fprintd.so
auth sufficient unix.so nullok try_first_pass
auth optional pam_mount.so
auth requisite pam_succeed_if.so uid >= 1000 quiet_success
auth required pam_deny.so
account required pam_unix.so
account sufficient pam_localuser.so
account sufficient pam_succeed_if.so uid < 1000 quiet
account required pam_permit.so
password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok
password optional pam_mount.so
password requisite pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=
password required pam_deny.so
session optional pam_keyinit.so revoke
session required pam_limits.so
-session optional pam_systemd.so
session required pam_unix.so
session optional pam_mount.so
/etc/security/pam_mount.conf.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
<pam_mount>
<debug enable="1">
<volume fstype="fuse" path="sshfs#%(USER)@my-server:/my/path" mountpoint="/home/%(USER)" options="nonempty" />
<mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
<mntoptions require="nosuid,nodev" />
<logout wait="0" hup="no" term="no" kill="no" />
<mkmountpoint enable="1! remove="true" />
<fd0ssh>/usr/libexec/hxtools/fd0ssh</fd0ssh>
</pam_mount>
What is odd is if I change the mountpoint in my pam_mount.conf.xml to some where else than the usual home diretcroy e.g:
/etc/security/pam_mount.conf.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
<pam_mount>
<debug enable="1">
<volume fstype="fuse" path="sshfs#%(USER)@my-server:/my/path" mountpoint="/mnt/%(USER)" options="nonempty" />
<mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
<mntoptions require="nosuid,nodev" />
<logout wait="0" hup="no" term="no" kill="no" />
<mkmountpoint enable="1! remove="true" />
<fd0ssh>/usr/libexec/hxtools/fd0ssh</fd0ssh>
</pam_mount>
everything works fine. How does the configuration files need to be adopted so that pam_mount mount the directory directly under home ?
centos nfs pam home automounting
Have you checked if there is anything in the/home/%(USER)
directory the moment after the login hangs?
â expz
2 days ago
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Currently I am trying to mount NFS folder as home folder for my users via pam.d and pam_mount. Unfortunately, when I log into my machine I get stuck in spawn.c with following message:
(spawn.c:136): setting uid to user myusername
I configured my system (CentOS 7) as follow:
/etc/pam.d/system-auth
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth required pam_faildelay.so delay=2000000
auth sufficient pam_fprintd.so
auth sufficient unix.so nullok try_first_pass
auth optional pam_mount.so
auth requisite pam_succeed_if.so uid >= 1000 quiet_success
auth required pam_deny.so
account required pam_unix.so
account sufficient pam_localuser.so
account sufficient pam_succeed_if.so uid < 1000 quiet
account required pam_permit.so
password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok
password optional pam_mount.so
password requisite pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=
password required pam_deny.so
session optional pam_keyinit.so revoke
session required pam_limits.so
-session optional pam_systemd.so
session required pam_unix.so
session optional pam_mount.so
/etc/security/pam_mount.conf.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
<pam_mount>
<debug enable="1">
<volume fstype="fuse" path="sshfs#%(USER)@my-server:/my/path" mountpoint="/home/%(USER)" options="nonempty" />
<mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
<mntoptions require="nosuid,nodev" />
<logout wait="0" hup="no" term="no" kill="no" />
<mkmountpoint enable="1! remove="true" />
<fd0ssh>/usr/libexec/hxtools/fd0ssh</fd0ssh>
</pam_mount>
What is odd is if I change the mountpoint in my pam_mount.conf.xml to some where else than the usual home diretcroy e.g:
/etc/security/pam_mount.conf.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
<pam_mount>
<debug enable="1">
<volume fstype="fuse" path="sshfs#%(USER)@my-server:/my/path" mountpoint="/mnt/%(USER)" options="nonempty" />
<mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
<mntoptions require="nosuid,nodev" />
<logout wait="0" hup="no" term="no" kill="no" />
<mkmountpoint enable="1! remove="true" />
<fd0ssh>/usr/libexec/hxtools/fd0ssh</fd0ssh>
</pam_mount>
everything works fine. How does the configuration files need to be adopted so that pam_mount mount the directory directly under home ?
centos nfs pam home automounting
Currently I am trying to mount NFS folder as home folder for my users via pam.d and pam_mount. Unfortunately, when I log into my machine I get stuck in spawn.c with following message:
(spawn.c:136): setting uid to user myusername
I configured my system (CentOS 7) as follow:
/etc/pam.d/system-auth
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth required pam_faildelay.so delay=2000000
auth sufficient pam_fprintd.so
auth sufficient unix.so nullok try_first_pass
auth optional pam_mount.so
auth requisite pam_succeed_if.so uid >= 1000 quiet_success
auth required pam_deny.so
account required pam_unix.so
account sufficient pam_localuser.so
account sufficient pam_succeed_if.so uid < 1000 quiet
account required pam_permit.so
password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok
password optional pam_mount.so
password requisite pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=
password required pam_deny.so
session optional pam_keyinit.so revoke
session required pam_limits.so
-session optional pam_systemd.so
session required pam_unix.so
session optional pam_mount.so
/etc/security/pam_mount.conf.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
<pam_mount>
<debug enable="1">
<volume fstype="fuse" path="sshfs#%(USER)@my-server:/my/path" mountpoint="/home/%(USER)" options="nonempty" />
<mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
<mntoptions require="nosuid,nodev" />
<logout wait="0" hup="no" term="no" kill="no" />
<mkmountpoint enable="1! remove="true" />
<fd0ssh>/usr/libexec/hxtools/fd0ssh</fd0ssh>
</pam_mount>
What is odd is if I change the mountpoint in my pam_mount.conf.xml to some where else than the usual home diretcroy e.g:
/etc/security/pam_mount.conf.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
<pam_mount>
<debug enable="1">
<volume fstype="fuse" path="sshfs#%(USER)@my-server:/my/path" mountpoint="/mnt/%(USER)" options="nonempty" />
<mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
<mntoptions require="nosuid,nodev" />
<logout wait="0" hup="no" term="no" kill="no" />
<mkmountpoint enable="1! remove="true" />
<fd0ssh>/usr/libexec/hxtools/fd0ssh</fd0ssh>
</pam_mount>
everything works fine. How does the configuration files need to be adopted so that pam_mount mount the directory directly under home ?
centos nfs pam home automounting
centos nfs pam home automounting
asked Sep 27 at 15:00
FranzOS
1
1
Have you checked if there is anything in the/home/%(USER)
directory the moment after the login hangs?
â expz
2 days ago
add a comment |Â
Have you checked if there is anything in the/home/%(USER)
directory the moment after the login hangs?
â expz
2 days ago
Have you checked if there is anything in the
/home/%(USER)
directory the moment after the login hangs?â expz
2 days ago
Have you checked if there is anything in the
/home/%(USER)
directory the moment after the login hangs?â expz
2 days ago
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f471852%2fmounting-nfs-directory-as-home-directory-under-home-for-users-using-pam-d-and-p%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Have you checked if there is anything in the
/home/%(USER)
directory the moment after the login hangs?â expz
2 days ago