linux 常用命令: runuser
rpm: coreutils-8.4-9.el6.x86_64
runuser --help
用法:runuser [选项]... [-] [用户 [参数]... ]
Change the effective user id and group id to that of USER. Only session PAM
hooks are run, and there is no password prompt. This command is useful only
when run as the root user. If run as a non-root user without privilege
to set user ID, the command will fail as the binary is not setuid.
As runuser doesn't run auth and account PAM hooks, it runs with lower overhead
than su. -, -l, --login make the shell a login shell, uses runuser-l
PAM file instead of default one
-g --group=group specify the primary group
-G --supp-group=group specify a supplemental group
-c, --command=COMMAND pass a single COMMAND to the shell with -c
--session-command=COMMAND pass a single COMMAND to the shell with -c
and do not create a new session
-f, --fast pass -f to the shell (for csh or tcsh)
-m, --preserve-environment do not reset environment variables
-p same as -m
-s, --shell=SHELL run SHELL if /etc/shells allows it
--help 显示此帮助信息并退出
--version 显示版本信息并退出 单独的"-"选项隐含了-l。如果不指定用户,则假设其为root。 请向bug-coreutils@gnu.org 报告runuser 的错误
GNU coreutils 项目主页:<http://www.gnu.org/software/coreutils/>
GNU 软件一般性帮助:<http://www.gnu.org/gethelp/>
请向<http://translationproject.org/team/zh_CN.html> 报告runuser 的翻译错误
要获取完整文档,请运行:info coreutils 'runuser invocation'
使用:
# For SELinux we need to use 'runuser' not 'su'
if [ -x "/sbin/runuser" ]; then
SU="/sbin/runuser -s /bin/sh"
else
SU="/bin/su -s /bin/sh"
fi
linux 常用命令: runuser的更多相关文章
- Linux常用命令(一)
Linux常用命令 1. pwd查看当前路径(Print Working Directory) [root@CentOS ~]# pwd/root 2. cd .. 返回上一级 .. 表示上一级 ...
- linux常用命令的介绍
本文主要介绍Linux常用命令工具,比如用户创建,删除,文件管理,常见的网络命令等 如何创建账号: 1. 创建用户 useradd -m username -m 表示会在/home 路径下添加创建用户 ...
- linux——常用命令与脚本
linux常用命令 --文件管理pwd --查看当前目录cd --切换当前目录ls --列出当前目录下的所有文件touch --创建文件mkdir --建立目录rmdir --删除空目录rm --删除 ...
- DOS 和 Linux 常用命令的对比
DOS 和 Linux 常用命令的对比 许多在 shell 提示下键入的 Linux命令都与你在 DOS 下键入的命令相似.事实上,某些命令完全相同. 本附录提供了 Windows的 DOS 提示下的 ...
- 第一章,Linux常用命令
20161124 Linux常用命令1.find find /etc/ -size +50k -lsfind /etc/ -size +50k -ls 2> /dev/null查看目录下大于50 ...
- linux 常用命令大全
linux 常用命令大全 系统信息 arch 显示机器的处理器架构(1) uname -m 显示机器的处理器架构(2) uname -r 显示正在使用的内核版本 dmidecode -q 显示硬件系统 ...
- Linux 常用命令行
Linux常用命令行 第一部分: cd命令 第二部分:文件操作 第三部分:压缩包操作
- [工作需求]linux常用命令以及vim常用命令
一. Linux 常用命令 mkdir dirname新建文件夹 cd ~ 进入自己的家目录 cd dirname 进入名字为dirname的目录: l 显示当前文件夹下的文件 ...
- 对于我的linux常用命令的说明
我所列出的linux常用命令中的选项并不是全部的选项,是一些我们经常用到的linux命令及选项
- Linux 常用命令笔记
Linux 常用命令笔记 1. locate locate:用来定位文件的位置,如:locate a.txt 但是这个命令有延迟,也就是新建的文件不一定能搜索到,如果非要找到新建的文件可以使用 upd ...
随机推荐
- JZOJ 5776. 【NOIP2008模拟】小x游世界树
5776. [NOIP2008模拟]小x游世界树 (File IO): input:yggdrasil.in output:yggdrasil.out Time Limits: 1500 ms Me ...
- linux批量替换
sed -i "s/李三/李四/g" -r result/* 将result文件夹下的所有文件中的李三替换成李四 sed命令下批量替换文件内容 格式: sed -i ...
- MTCNN自己的学习理解
MTCNN 流程 经过三个网络 P-Net,R-Net,O-Net 对于P-Net: P-Net是一个全卷积层,不涉及到全连接层,所以我们的输入图像的尺寸可以是不固定的. 对于P-Net来说,我们的输 ...
- Codeforces Round #464 (Div. 2) C. Convenient For Everybody
C. Convenient For Everybody time limit per test2 seconds memory limit per test256 megabytes Problem ...
- HDU:2222-Keywords Search(AC自动机模板,匹配模拟)
Keywords Search Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) P ...
- DFS:POJ1088-滑雪(记忆化搜索)
题目: 滑雪 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 97666 Accepted: 37055 Description ...
- 菜鸟学Linux - bash的配置文件
bash是各大Linux发行版都支持的shell.当我们登陆bash的时候,虽然我们什么都没做,但是我们已经可以在bash中调用各种各样的环境变量了.这是因为,系统中已经定义了一系列的配置文件,以及加 ...
- java集群技术
序言 越来越多的关键应用运行在J2EE(Java 2, Enterprise Edition)中,这些诸如银行系统和账单处理系统需要高的可用性(High Availability, HA),同时像Go ...
- cakephp 中Console / Shell 有什么优点?
Which is the advantage of using CakePHP Console / Shell for programmed tasks ? 查看原文 最近用到了cakephp中的sh ...
- SetUnhandledExceptionFilter
SetUnhandledExceptionFilter 设置未捕获异常处理 通常windows程序长时间运行,会发生各种问题,例如访问异常,内存溢出,堆栈破坏等. 这时候通常希望程序自己能增加处理,而 ...