如何使用skel设置新用户
我在我的服务器上有一个我用于所有用户的设置。 每次我创建一个新用户时,我都要反复复制所有设置。
例如:
- .vimrc里。
- 。轮廓
- 的.bashrc
- firefox主页到我们的内部网
- 进化设置(服务器和用户名)等……
我看到skel可以做到这一点,当我使用adduser
时,是否有一种简单的方法来设置用户的设置?
谢谢
一切都应该位于/etc/skel
文件夹中。
您需要在桌面上为所有用户创建链接:
mkdir -p /etc/skel/Desktop cd /etc/skel/Desktop/ vi shortcut.desktop [Desktop Entry] Version=1.0 Name=ShortCut Comment=Visit ShortCut GenericName=ShortCut Exec=firefox http://intranet.ShortCut.com Terminal=false X-MultipleArgs=false Type=Application Icon=firefox Categories=Internet chmod +x shortcut.desktop
这将在桌面上创建一个链接。
这里有一些文章可以帮助您满足您的需求:
- 如何为所有用户应用自定义Gnome-shell主题?
- 如何确保所有新用户具有与当前用户相同的配置文件设置?
- http://www.linuxhowtos.org/Tips%20and%20Tricks/using_skel.htm
- http://humanreadable.nfshost.com/sdeg/etc_skel.htm
- http://www.linfo.org/etc_skel.html
- http://www.booser.com/etc-skel-directory.html
- http://www.thegeekstuff.com/2009/06/useradd-adduser-newuser-how-to-create-linux-users/#more-552
我认为在/ etc / skel中使用你想要使用的各种东西是最简单的。
另一种选择是编写脚本。