Difference between revisions of "Howto HostAuth"
From Linux-VServer
m (HowtoHostAuth moved to Howto HostAuth: collision with oldwiki?) |
(Clarified what's going on based on my own experience) |
||
Line 1: | Line 1: | ||
== What is this? == | == What is this? == | ||
− | This is host-auth module for linux-vserver powered systems. | + | This is PAM host-auth module for linux-vserver powered systems. |
− | + | The nss_vserver module allows processes running on the host (sshd, getty) to authenticate users that exist on guests. | |
− | + | If you want to complete the guest login process, you should also get a modified version of vslogin linked to below. vslogin will pick up after authentication and deliver the user to a shell on his guest. | |
− | + | Note that with nss_vserver you don't need the syncshadows included in the vserverauth tarball. | |
− | + | == Installation Instructions == | |
− | + | ||
− | == | + | |
On linux, just run | On linux, just run | ||
Line 41: | Line 39: | ||
</code> | </code> | ||
− | == | + | == Use with vslogin == |
− | After you have installed module, | + | After you have installed module, (and have vslogin copied to /sbin/ and suid-root) you are ready: try to login into a guest, say one named "test" with user "user", by loggin in into the host with username "test-user" or "user@test." You should find yourself logged into the guest. |
− | + | == Caveats == | |
− | == | + | === Security === |
+ | WARNING! If you have installed vslogin, NEVER give shell access to your host to users -- any user on host, who able to execute programs and modify environment will be able to log into guests as anybody he wants! | ||
− | + | === Usernames and guest names with dashes === | |
− | + | Avoid using usernames or guest names with dashes. | |
− | + | The current version only tries one configuration while searching for the user in guest databases, which can cause problems: | |
− | User " | + | * User "user" on guest "ser-ver" when written as "user@ser-ver" will work fine, while "ser-ver-user" will be threated as user "ver-user" on vserver "ser". |
+ | * User "us-er" on guest "server" when written as "guest-us-er" will work fine, while "us-er@guest" will be threated as user "er@guest" on vserver "us". | ||
− | If you | + | If you must have dashes, use the syncshadows method instead. |
== Download links == | == Download links == | ||
Line 63: | Line 63: | ||
nss_vserver: http://dev.call2ru.com/vs/nss_vserver.tar.bz2 | nss_vserver: http://dev.call2ru.com/vs/nss_vserver.tar.bz2 | ||
− | + | modified vslogin: http://dev.call2ru.com/vs/vserverauth.tar.gz | |
− | == | + | == Authors and copyright == |
− | nss_vserver | + | nss_vserver was written by Anton Fedorov <datacompboy@call2ru.com> 19 march 2006 and is public domain; feel free to use it as you want. |
− | + | vslogin was written by Alec Thomas (http://swapoff.org/LinuxVServer) |
Revision as of 02:42, 7 March 2008
Contents |
What is this?
This is PAM host-auth module for linux-vserver powered systems.
The nss_vserver module allows processes running on the host (sshd, getty) to authenticate users that exist on guests.
If you want to complete the guest login process, you should also get a modified version of vslogin linked to below. vslogin will pick up after authentication and deliver the user to a shell on his guest.
Note that with nss_vserver you don't need the syncshadows included in the vserverauth tarball.
Installation Instructions
On linux, just run
make install
After, try to run
make test
To see if it works.
How to remove it from system?
Just run
make uninstall
Use with vslogin
After you have installed module, (and have vslogin copied to /sbin/ and suid-root) you are ready: try to login into a guest, say one named "test" with user "user", by loggin in into the host with username "test-user" or "user@test." You should find yourself logged into the guest.
Caveats
Security
WARNING! If you have installed vslogin, NEVER give shell access to your host to users -- any user on host, who able to execute programs and modify environment will be able to log into guests as anybody he wants!
Usernames and guest names with dashes
Avoid using usernames or guest names with dashes.
The current version only tries one configuration while searching for the user in guest databases, which can cause problems:
- User "user" on guest "ser-ver" when written as "user@ser-ver" will work fine, while "ser-ver-user" will be threated as user "ver-user" on vserver "ser".
- User "us-er" on guest "server" when written as "guest-us-er" will work fine, while "us-er@guest" will be threated as user "er@guest" on vserver "us".
If you must have dashes, use the syncshadows method instead.
Download links
nss_vserver: http://dev.call2ru.com/vs/nss_vserver.tar.bz2
modified vslogin: http://dev.call2ru.com/vs/vserverauth.tar.gz
Authors and copyright
nss_vserver was written by Anton Fedorov <datacompboy@call2ru.com> 19 march 2006 and is public domain; feel free to use it as you want.
vslogin was written by Alec Thomas (http://swapoff.org/LinuxVServer)