在运行 Ubuntu Linux 的多台计算机之间共享帐户

16 user-accounts ubuntu

我的学校有一个计算机实验室,里面装满了运行 Red Hat Linux 的机器。他们设置了它,这样你就可以登录实验室中的任何一台计算机,它会自动加载你的桌面、主目录等,这使得实验室中的所有计算机对你来说都是一样的,无论你是哪台计算机。重新使用。

我家里有两台运行 Ubuntu Linux 的计算机。我可以用家里的电脑做同样的事情吗?它叫什么,我如何找到有关如何设置它的文档?谢谢!

kma*_*rsh 9

For a small environment at home, you can do the same thing without a full-blown Directory Services server like LDAP or NIS.

Simply create user accounts with the same user name, userid and group id on all systems. Pick one system to host home directories, and use autofs on the other system to mount these directories over NFS.

这让您无需付出任何努力即可获得目录服务的大部分好处。只要您将维护工作限制在少数用户和几台计算机上,维护就完全可以忍受。一旦它扩展到教室规模,以及每年的学生流动率,您就需要进入目录服务级别,如 quack quixote 所描述的那样。


qua*_*ote 7

您指的是目录服务。有多种系统可以提供此功能。 DNS可能是最著名的目录服务类型;这就是您的计算机将域名 ( www.example.com ) 转换为 IP 地址 ( 111.000.111.000 ) 的方式。

Hesiod是最古老的目录服务之一;它采用了 DNS 概念并将其应用于经常更改的信息,例如用户、组和密码。 NISNIS+(网络信息服务又名 YellowPages/YP,由 Sun Microsystems 开发)是另一个对许多 Unixen 通用的系统;LDAP(轻量级目录访问协议)是一个较新的系统。Microsoft 为Windows Server提供了一个名为Active Directory的系统,Apple 为OS X Server提供了一个名为Open Directory的服务。

On Unix and Unix-like systems these services are usually configured through the NSS (Name Service Switch) configuration, /etc/nsswitch.conf. You can use any of the systems mentioned earlier; to set them up, you'll need to (a) install the service server; (b) configure the backend database; (c) install the client software; and (d) make sure your nsswitch.conf is configured properly. For example, these lines in nsswitch.conf tell the system to (a) try accessing local files first, and then (b) attempt an LDAP query if the first fails:

passwd: files ldap
shadow: files ldap
group: files ldap
hosts: files ldap
Run Code Online (Sandbox Code Playgroud)

I've asked a related question looking for basic how-to-configure-LDAP instructions, but it's unanswered at the moment. Directory services are more often used in business environments than the home, so Server Fault has a wider variety of questions on most of these systems.