个人工具

“UbuntuHelp:UbuntuLTSP/UnlockChrootRootAcct”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(创建新页面为 '{{From|https://help.ubuntu.com/community/UbuntuLTSP/UnlockChrootRootAcct}} {{Languages|UbuntuHelp:UbuntuLTSP/UnlockChrootRootAcct}} {|border="1" cellspacing="0" |This page is sp...')
 
第2行: 第2行:
 
{{Languages|UbuntuHelp:UbuntuLTSP/UnlockChrootRootAcct}}
 
{{Languages|UbuntuHelp:UbuntuLTSP/UnlockChrootRootAcct}}
 
{|border="1" cellspacing="0"
 
{|border="1" cellspacing="0"
|This page is specific to Ubuntu versions 8.04
+
|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.''
 
''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.''
第9行: 第9行:
 
----
 
----
 
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!).
 
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).
+
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 [[UbuntuHelp:UbuntuLTSP/CreateChrootAdminAcct|create|an ''admin'' account in the chroot]].
 
* The procedure is fairly simple. First step is to unlock the account inside the chroot:
 
* The procedure is fairly simple. First step is to unlock the account inside the chroot:
 
<pre><nowiki>
 
<pre><nowiki>
第23行: 第23行:
 
</nowiki></pre>
 
</nowiki></pre>
 
'''All done!'''
 
'''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:
 +
<pre><nowiki>
 +
sudo chroot /opt/ltsp/i386 passwd -l root
 +
sudo ltsp-update-image
 +
</nowiki></pre>
 
----
 
----
 
[[category:CategoryLtsp]]
 
[[category:CategoryLtsp]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2009年11月17日 (二) 20:55的版本

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