1.1 Labs Exercise 1.1: Configuring the System for sudo It is very dangerous to run a root shell unless absolutely necessary: a single typo or other mistake can cause serious (even fatal) damage. Thus, the sensible procedure is to configure things such that single commands may be run with superuser privilege, by using the sudo mechanism. With sudo the user only needs to know their own password and never needs to know the root password. If you are using a distribution such as Ubuntu, you may not need to do this lab to get sudo configured properly for the course. However, you should still make sure you understand the procedure. To check if your system is already configured to let the user account you are using run sudo, just do a simple command like: $ sudo ls You should be prompted for your user password and then the command should execute. If instead, you get an error message you need to execute the following procedure. Launch a root shell by typing su and then giving the root password, not your user password. On all recent Linux distributions you should navigate to the /etc/sudoers.d subdirectory and create a file, usually with the name of the user to whom root wishes to grant sudo access. However, this convention is not actually necessary as sudo will scan all files in this directory as needed. The file can simply contain:



















剩余102页未读,继续阅读

- 粉丝: 24
- 资源: 2
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


会员权益专享

- 1
- 2
前往页