在root下无法完成添加用户组操作,如下:

[root@host8 ~]# addgroup hadoop
-bash: addgroup: command not found

这是的,root下竟然不能用,上网查了一下:

引用:http://blog.csdn.net/nanyida0416sushe/article/details/5671876

(

后来一想,原来是su的错。之前是在普通用户下。直接 SU切换到ROOT用户。退出换成SU - root 再切换到ROOT用户就好了。

su 只能切换到管理员用户权限,不使用管理员的登陆脚本和搜索路径 
su -  不但能切换到管理员权限而且使用管理员登陆脚本和搜索路径 
使用su -  环境变量也跟着来啦~

)

我是按照他的来,还是不能用,为啥?

[ora@host8 root]$ su - root
密码:

[root@host8 ~]# addgroup hadoop
-bash: addgroup: command not found

无奈:

我只好在查一下:

addgroup 的位置

~]# ls -l /usr/sbin/groupadd
-rwxr-x---. 1 root root 53488 8月 2 2011 /usr/sbin/groupadd

而后:

[root@host8 ~]# /usr/sbin/groupadd hadoop

这样就凑合的用了,全不清楚上面错误情况为啥!就这样用了,有了好的方法欢迎给留言,谢谢!

Linus的redHat在root出现错误:-bash: addgroup: command not found的更多相关文章

  1. linux报错-bash: xhost: command not found

    本帖转自倔强小梦https://www.cnblogs.com/xphdbky/p/8243008.html 倔强小梦参考自:http://blog.csdn.net/csdnones/article ...

  2. -bash: xhost: command not found

    参考自:http://blog.csdn.net/csdnones/article/details/51513163,感谢原作者解决了我的问题. 执行xhost +,报以下错误,原因是因未没有安装相关 ...

  3. 【linux报错】-bash: xhost: command not found

    参考自:http://blog.csdn.net/csdnones/article/details/51513163,感谢原作者解决了我的问题. 执行xhost +,报以下错误,原因是因未没有安装相关 ...

  4. [原创]-bash: iostat: command not found解决办法

    [root@testhost ~]# iostat-bash: iostat: command not found IOSTAT 命令不可用,首先确认sysstat包是否安装,sysstat包中包括i ...

  5. centos7 (ifconfig不能使用) -bash: ifconfig: command not found

    [root@localhost ~]# ifconfig -bash: ifconfig: command not found 输入ip addr 确认IP地址是否设置正常,设置好如下所示,如果没有获 ...

  6. telnet不能用,提示:-bash: telnet: command not found

    1.[root@localhost ~]# telnet  bash: telnet: command not found 2. 查询了是否安装Telnet包,结果如下: [root@localhos ...

  7. -bash: iostat: command not found解决办法

    [root@testhost ~]# iostat-bash: iostat: command not found IOSTAT 命令不可用,首先确认sysstat包是否安装,sysstat包中包括i ...

  8. bash: ipconfig: command not found

    问题描述: [root@localhost ~]# ipconfig-bash: ipconfig: command not found[root@localhost ~]# 解决方法一: cd /e ...

  9. RedHat中敲sh-copy-id命令报错:-bash: ssh-copy-id: command not found

    RedHat中敲sh-copy-id命令报错:-bash: ssh-copy-id: command not found 在多台Linux服务器SSH相互访问无需密码, 其中进入一台Linus中,对其 ...

随机推荐

  1. LINUX下为ORACLE数据库设置大页--hugepage

    在Linux中配置hugepage可以提高oracle的性能,减少oracle sga的页交换,类似于aix中的lagepage. 为什么 使用大页? LINUX内存的默认块大小是4K如果SGA为:1 ...

  2. another app is currently holding the yum lock;waiting for it to exit解决

    有时用yum升级一些文件时,会出现以下情况:   another app is currently holding the yum lock;waiting for it to exit...   可 ...

  3. Linux下安装Nginx详细图解教程

    什么是Nginx? Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器,在高连接并发的情况下N ...

  4. block中防止循环引用的一个高大上的宏定义

    看惯了什么tempSelf weakSelf,来点高大的 #define weakify(...) \ rac_keywordify \ metamacro_foreach_cxt(rac_weaki ...

  5. pthread_rwlock

    读写锁   1.概述 读写锁与互斥量类似,不过读写锁允许更高的并行性.互斥量要么是锁住状态,要么是不加锁状态,而且一次只有一个线程对其加锁.读写锁可以有三种状态:读模式下加锁状态,写模式下加锁状态,不 ...

  6. 在.NET 环境中实现每日构建(Daily Build)--ccnet,MSBuild篇(转载)

    每日构建,对我们团队来说一个全新的概念.随着项目开发的进展,在开发过 程需要及时反馈一些BUG和功能要求的处理情况.而在这种情况下每天或隔一段时间Build一个版本,工作量还是比较大的,所以就特别有必 ...

  7. Excel导入导出,生成和下载Excel报表、附件等操作--ASP.NET

    public class OutExcel { public static void OutExcel_bb(DataTable dt, string thepath, string temppath ...

  8. Java报错原因汇总

    1. java.lang.nullpointerexception 这个异常大家肯定都经常遇到,异常的解释是"程序 遇上了空指针",简单地说就是调用了未经初始化的对象或者是不存在的 ...

  9. NOIP 2014 pj & tg

    由于我太弱,去了pj组= = ============================== T1: 傻逼暴力 T2: 傻逼暴力+判断+更新 T3: 手画一下就知道了.算出这个点在第几圈,再使劲yy下在 ...

  10. CSS3.0盒模型display:-webkit-box;的使用

    box-flex是css3新添加的盒子模型属性,它的出现可以解决我们通过N多结构.css实现的布局方式.经典   的一个布局应用就是布局的垂直等高.水平均分.按比例划分. 目前box-flex属性还没 ...