查看完整版本 : su - or su - root in centos linux

chuikingman 2014-3-30 08:15 AM

su - or su - root in centos linux

You reference link is not my case .

My case is :

In non-root account , I can use " su - " to switch to root account.
But the command "su - root " is needed to disabled...

I search you reference link but it is not my case ..
Please suggest another way .....

foureyesboy 2014-4-1 10:18 PM

Extraction of "man su" on CentOS:
[quote]
SYNOPSIS
             su [OPTION]... [-] [[USER] [ARG]...]
[/quote]
and most important,
[quote]
A mere - implies -l.  If USER not given, assumes root.
[/quote]

I don't understand why you use "su -" but want to disable "su - root" at the same time.

ykmran 2014-4-12 11:45 PM

$ sudo -i
$ sudo su - -s /bin/bash root

chuikingman 2014-4-13 08:06 PM

回覆 3# 的帖子

I do not understand what do you mean ...

I want to know how I can make in normal centos linux .
Only allow "su - " to switch to root .
But it is not allow use "su - root" to switch to root.

How I can make this in normal centos OS ...not need to ask the purpose .....It just want to reproduce ...
頁: [1]
查看完整版本: su - or su - root in centos linux