测试环境搭建整套大数据系统(四:ubuntu22.4创建普通用户)

一:创建用户,修改密码,增加sudo权限。

useradd dolphinscheduler
#输入密码
passwd dolphinscheduler
# 配置 sudo 免密
sed -i '$adolphinscheduler  ALL=(ALL)  NOPASSWD: NOPASSWD: ALL' /etc/sudoers
sed -i 's/Defaults    requirett/#Defaults    requirett/g' /etc/sudoers

二:修改配置

# 在root用户下执行
root@hadoop101:/opt$ vim /etc/passwd

在这里插入图片描述

root@hadoop100:~#  sudo mkdir /home/dolphinscheduler
root@hadoop100:~# sudo chown dolphinscheduler:dolphinscheduler /home/dolphinscheduler
root@hadoop100:~# su dolphinscheduler
dolphinscheduler@hadoop100:/root$ cp /etc/skel/.bashrc ~/
dolphinscheduler@hadoop100:/root$ vi ~/.profile

将以下内容填写到 ~/.profile

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi
dolphinscheduler@hadoop100:/root$ source ~/.profile
退出普通用户 Ctrl+D
root@hadoop100:~# sudo bash
root@hadoop100:~# chmod 775 .

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-02-21 10:38:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-02-21 10:38:02       101 阅读
  3. 在Django里面运行非项目文件

    2024-02-21 10:38:02       82 阅读
  4. Python语言-面向对象

    2024-02-21 10:38:02       91 阅读

热门阅读

  1. Python日志(logging)

    2024-02-21 10:38:02       42 阅读
  2. C 语言中的 const 关键字详解

    2024-02-21 10:38:02       49 阅读
  3. aop实现统一处理日志

    2024-02-21 10:38:02       48 阅读
  4. OpenHarmony下gn相关使用

    2024-02-21 10:38:02       55 阅读
  5. SpringMVC

    SpringMVC

    2024-02-21 10:38:02      42 阅读
  6. 认识K8S

    认识K8S

    2024-02-21 10:38:02      41 阅读