linux(ubuntu) 创建一个名为hadoop的用户和用户组
2016-02-25 22:56
465 查看
写在前面:无论怎么确认,还是泪奔了,同一个账号以前的东西消失了,虽然不多,如同丢失了心爱的东西。
步骤:
1. 创建名为hadoop用户组
sudo addgroup hadoop
2. 创建名为hadoop的用户
sudo adduser --ingroup hadoop hadoop
直接一路回车
3. sudo gedit /etc/sudoers
为了让hadoop使用sudo命令,修改该文件,在root ALL=(ALL:ALL) ALL下面添加一行:
hadoop ALL=(ALL:ALL) ALL
原文件备份:
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
(应在此处添加修改)
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
参考链接:
http://blog.sina.com.cn/s/blog_6754000a01019zhl.html
步骤:
1. 创建名为hadoop用户组
sudo addgroup hadoop
2. 创建名为hadoop的用户
sudo adduser --ingroup hadoop hadoop
直接一路回车
3. sudo gedit /etc/sudoers
为了让hadoop使用sudo命令,修改该文件,在root ALL=(ALL:ALL) ALL下面添加一行:
hadoop ALL=(ALL:ALL) ALL
原文件备份:
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
(应在此处添加修改)
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
参考链接:
http://blog.sina.com.cn/s/blog_6754000a01019zhl.html
相关文章推荐
- linux中fork()函数详解
- linux内核链表
- 在windows 与Linux间实现文件传输(C++&C实现)
- Linux精讲——cp命令
- 【linux内核学习】怎么找到要修改的驱动源码
- Linux input子系统分析
- Linux input子系统分析
- Linux input子系统分析
- Linux中patch补丁命令
- Linux Framebuffer驱动剖析之二—驱动框架、接口实现和使用
- Linux Framebuffer驱动剖析之二—驱动框架、接口实现和使用
- Linux Framebuffer驱动剖析之二—驱动框架、接口实现和使用
- Linux Framebuffer驱动剖析之一—软件需求
- Linux Framebuffer驱动剖析之一—软件需求
- Linux Framebuffer驱动剖析之一—软件需求
- 从linux复制文件到本地
- Linux下清理内存和Cache方法 /proc/sys/vm/drop_caches
- vmware 克隆centos6.6无法上网解决办法
- linux安全第一周总结——20135227黄晓妍
- cobbler安装centos系统