错误信息如下:

/usr/bin/xauth: file /home/user/.Xauthority does not exist

错误原因:
是因为添加用户时没有授权对应的目录,仅仅执行了useradd user而没有授权对应的家目录

直接解决办法如下(执行如下命令,以后就登录到终端上就不会出现上面的错误信息):

chown username:username -R /home/user_dir

不过一般是可以避免这种情况的出现,添加用户执行如下命令即可:

useradd username -m (-m 相当于会创建对应的用户家目录)

usermod -s /bin/bash username (指定shell,否则会非常不便于终端操作)

/usr/bin/xauth: file /home/user/.Xauthority does not exist的更多相关文章

  1. Xshell 6 首次连接虚拟机 CentOS 7.6报错:/usr/bin/xauth: file /root/.Xauthority does not exist

    使用 Xshell 6 首次连接虚拟机 CentOS 7.6 出现这样的提示: /usr/bin/xauth: file /root/.Xauthority does not exist 解决: 只需 ...

  2. 登录CentOS用户很慢/usr/bin/xauth: timeout in locking authority file /home/***/.Xauthority

    当使用非root用户登录CentOS时,发现很慢,而且弹出以下信息: /usr/bin/xauth:  timeout in locking authority file /home/***/.Xau ...

  3. Cannot install NodeJs: /usr/bin/env: node: No such file or directory

    安装doxmate时,doxmate地址是:https://github.com/JacksonTian/doxmatenpm install doxmate -g 安装完后把错误:Cannot in ...

  4. centos 7安装mysql报错-bash: ./scripts/mysql_install_db: /usr/bin/perl: bad interpreter: No such file or directory

    [root@localhost mysql]# ./scripts/mysql_install_db  --user=mysql -bash: ./scripts/mysql_install_db: ...

  5. /usr/bin/env: node: no such file or directory

    今天在安装gulp的之后,运行gulp命令出现了如下报错: /usr/bin/env: node: no such file or directory 网上找了好久,终于解决了,所以记录一下,便于下次 ...

  6. yum安装命令:遇到的问题报错如下: File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: 通过看报错可以了解到是使用了python2的语法,所以了解到当前yum使用的Python2,因为我单独安装了python3,且python3设置为默认版本了,所以导致语法问题 解决方法: 使用python2.6 yum install

    1.安装zip yum install -y unzip zip 2.安装lrszs yum -y install lrzsz 3.安装scp 遇到下面的问题: 结果提示: No package sc ...

  7. nagios监控客户端报错/usr/bin/perl^M: bad interpreter: No such file or directory

    nagios服务端监控客户端内存时发现监控不上 在客户端直接执行脚本,报错如下: # /usr/local/nagios/libexec/check_memory.pl -w 6% -c 3% -ba ...

  8. bash: /usr/bin/npm: No such file or directory

    一个整得很烂了的Ubuntu服务器, 各种问题乱出. npm老是升不到最新版(一直显示1.4),于是我干脆删了, 结果再去装却装不上了, 如果用apt-get install npm安装, 就得到如下 ...

  9. /usr/bin/ld: i386:x86-64 architecture of input file `command.o' is incompatible with i386 output

    /usr/bin/ld: i386:x86-64 architecture of input file `command.o' is incompatible with i386 output 出现这 ...

随机推荐

  1. Vue项目整体架构记要

    此文记录初次学习Vue的一些记要,可做为参考,导图有些生涩,故意不再加以修复完善,以持初心!

  2. 令人兴奋的TOP Server OPC Server v6.5 五大功能(上)

    Software Toolbox的OPC和原生HMI设备的连接软件:TOP Server OPC Server.TOP Server OPC Server是采用业界领先的Kepware技术的工业4.0 ...

  3. Requirements management in confluence

    https://ja.confluence.atlassian.com/doc/blog/2015/08/how-to-document-product-requirements-in-conflue ...

  4. Python学习日记(二十六) 封装和几个装饰器函数

    封装 广义上的封装,它其实是一种面向对象的思想,它能够保护代码;狭义上的封装是面向对象三大特性之一,能把属性和方法都藏起来不让人看见 私有属性 私有属性表示方式即在一个属性名前加上两个双下划线 cla ...

  5. 25.centos7基础学习与积累-011-课前考试二-命令练习

    从头开始积累centos7系统运用 大牛博客:https://blog.51cto.com/yangrong/p5 取IP地址: 6的命令:ifconfig eth0 7的命令 [root@pytho ...

  6. Pthon魔术方法(Magic Methods)-反射

    Pthon魔术方法(Magic Methods)-反射 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.反射概述 运行时,区别于编译时,指的时程序被加载到内存中执行的时候. 反射 ...

  7. spring cloud (五) 熔断面板 聚合熔断 turbine

    改造feign 项目 1 启动类添加注解  @EnableHystrix 2 添加如下配置文件 #ji eureka.instance.metadata-map.cluster=MAIN#actuat ...

  8. docker镜像里的tag那些事--alpine,slim,stretch,jessie

    https://stackoverflow.com/questions/54954187/docker-images-types-slim-vs-slim-stretch-vs-stretch-vs- ...

  9. win10永久激活方法(真正永久激活)

    win10的花费不低,所以很多电脑用户选择搜索激活,但是大部分用的激活工具激活的基本上都是假激活(或许本来就是),kms激活和试用账号临时激活都是有时间限制的,虽然到时都可以继续,但是系统还是明确此激 ...

  10. Alpha冲刺(8/10)——2019.5.1

    所属课程 软件工程1916|W(福州大学) 作业要求 Alpha冲刺(8/10)--2019.5.1 团队名称 待就业六人组 1.团队信息 团队名称:待就业六人组 团队描述:同舟共济扬帆起,乘风破浪万 ...