特殊:Badtitle/NS100:UbuntuLTSP/UnlockChrootRootAcct

来自Ubuntu中文
Wikibot留言 | 贡献2009年11月17日 (二) 20:55的版本
跳到导航跳到搜索
可打印版本不再受到支持且可能有渲染错误。请更新您的浏览器书签并改用浏览器默认打印功能。

{{#ifexist: :UbuntuLTSP/UnlockChrootRootAcct/zh | | {{#ifexist: UbuntuLTSP/UnlockChrootRootAcct/zh | | {{#ifeq: {{#titleparts:UbuntuLTSP/UnlockChrootRootAcct|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:UbuntuLTSP/UnlockChrootRootAcct|1|-1|}} | zh | | }}

This page is specific to Ubuntu versions 8.04 and 9.04

If you find this information applicable to additional versions/releases, please edit this page and modify this header to reflect that. Please also include any necessary modifications for this information to apply to the additional versions.


NOTE: Please use this page as a reference for other pages instead of simply copying the code.


This page is dedicated to unlocking the 'root' user account in the LTSP client chroot environment. There are many reasons to do this, which are most likely linked directly to this article (which is possibly how you got to this page in the first place!). By default in Ubuntu (server and chroot filesystems), the 'root' account is locked and users are advised to use 'sudo' to perform administrative tasks. This is a good idea, but there are also good reasons to use the root account directly (like performing automated jobs/tasks as the root user). To create an administrative user account in the chroot that can sudo to root, see create|an admin account in the chroot.

  • The procedure is fairly simple. First step is to unlock the account inside the chroot:
sudo chroot /opt/ltsp/i386 passwd -u root
  • Second step (optional) is to provide a password for root. Make sure this is a robust password:
sudo chroot /opt/ltsp/i386 passwd
  • Lastly, update the client image to reflect the changes we just made:
sudo ltsp-update-image

All done!


How to re-lock the root account After original reason for unlocking the LTSP client chroot environment root account is gone it is recommended to re-lock this root account.

  • This are the commands to reverse the previous unlocking:
sudo chroot /opt/ltsp/i386 passwd -l root
sudo ltsp-update-image