useradd 用户名

passwd 用户名

cat /etc/passwd  查看用户信息

删除用户

userdel -r   加一个 -r 表示把用户及用户的主目录都删除

su  切换用户

sudo  在执行这个命令式赋予超级权限,命令执行完回复当前用户的权限

用户root编辑   vi /etc/sudoers

shell编程

vi hello.sh

#!/bin/bash          ##表示用哪一种shell解析器来解析执行我们的脚本程序

mkdir scripts

vi helloword.sh

#!/bin/bash

echo "hello world"

chmod +x helloworld.sh

centos 下建用户 shell编程的更多相关文章

  1. 在Oracle SQLplus下建用户 建表

    在建表之前最好新建一个用户,因为在sys用户下的表格不允许删除列, 所以最好不要在sys用户下建表. 一.在Oracle SQLplus下建用户: 1.以dba身份登陆SQLplus: [oracle ...

  2. 嵌入式环境:CentOS下添加用户并且让用户获得root权限

    CentOS下添加用户并且让用户获得root权限 http://www.centoscn.com/CentOS/config/2014/0810/3471.html 1.添加用户,首先用adduser ...

  3. Centos下新建用户及修改用户目录

    Centos下新建用户及修改用户目录 Hillgo 关注 2015.09.22 01:32* 字数 154 阅读 3492评论 0喜欢 3 添加及删除用户 添加用户 test: adduser tes ...

  4. CentOS下解决”用户账户is not in the sudoers file“问题

    如上图,在当前用户cent(我的用户名)下使用sudo命令时,提示"cent is not in the sudoers file. This incident will be report ...

  5. Centos下普通用户设置sudo权限

    若执行sudo命令的用户没有sodu权限,则会报以下错误 violet is not in the sudoers file.This incident will be reported 若想让vio ...

  6. Centos下添加用户并赋权

    创建新用户 创建一个用户名为:linuxidc [root@localhost ~]# adduser linuxidc 为这个用户初始化密码,linux会判断密码复杂度,不过可以强行忽略: [roo ...

  7. [转] CentOS下添加用户并且让用户获得root权限

    http://www.centoscn.com/CentOS/config/2014/0810/3471.html 1.添加用户,首先用adduser命令添加一个普通用户,命令如下: #adduser ...

  8. Centos下添加用户到用户组

    将一个用户添加到用户组中,千万不能直接用: usermod -G groupA 这样做会使你离开其他用户组,仅仅做为 这个用户组 groupA 的成员. 应该用 加上 -a 选项: usermod - ...

  9. CentOS下添加用户并且让用户获得root权限

    转自:https://blog.csdn.net/tropicofcancer9/article/details/53926920 1.添加用户,首先用adduser命令添加一个普通用户,命令如下: ...

随机推荐

  1. http 上传文件

    @RequestMapping(method=RequestMethod.POST,value = "/upload") public ModelAndView processIm ...

  2. Document 按照xml格式输出

    private void GetXMLDocument(Document doc) { OutputFormat format1 = new OutputFormat(" ", t ...

  3. 原生js添加和删除类

    原生js添加和删除类: this.className +=" "; this.className = this.className.replace(" 原来的类" ...

  4. 【Java】RuleSource约束常用方法整理

    1-常用约束规则RuleSource的设置方法   例如: addRules(new Rules(ProgramFeeItem.class){ protected void initRules() { ...

  5. dynamic 是什么

    dynamic是c# 4.0新增的类型,可以修饰类,对象,属性,索引器,方法返回值等. class ExampleClass { // A dynamic field. static dynamic ...

  6. 为什么用evernote

    其实是没有什么为什么的. 如果真要找个理由,那应该是: 为知的界面看着总觉得很糙.      这个糙指的是不像个好软件,而装上evernote感觉就不一样. 有道笔记新版本貌似在我这儿有BUG.    ...

  7. docker 报Error: docker-engine-selinux conflicts with docker-selinux-1.9.1-25.el7.centos.x86_64

    root@ecshop Deploy]# yum -y install docker-engine-selinux.noarchLoaded plugins: fastestmirrorhttp:// ...

  8. uboot中添加FIQ中断及相关问题

    本文主要说明了在uboot中添加FIQ中断时遇到的问题以及对应的解决办法. 首先交代一下项目的软硬件环境.硬件方面,使用s3c2440作为主控芯片,外接串口.网卡等设备.软件方面,主控芯片上电后运行u ...

  9. WinForm 快捷键设置(转载)

    1.Alt+*(按钮快捷键) 按钮快捷键也为最常用快捷键,其设置也故为简单.在大家给button.label.menuStrip等其他控件的Text属性指定名称时,在其后面加上‘&’然后在加上 ...

  10. Sortable Observable Collection in C#

    Sorting outside the collection protected override void OnNavigatedTo(NavigationEventArgs e) { if (Se ...