Su root or login root

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Su root or login root
# 8  
Old 03-28-2014
Remove users from the 'admin' or 'wheel' groups if you don't want them to su.
# 9  
Old 03-28-2014
No.the case I want to reproduce is :

I can use "su -" in non-root user account to switch to "root" .But the command "su - root" is disabled.
the login from console with root account is also disable .

please advice how I can make this setting in normal linux OS .
# 10  
Old 03-29-2014
Smilie That does not make sense. "su -" and "su - root" do the same thing.
# 11  
Old 03-29-2014
It is true . That is what I find in the strange centos linux OS.
I want to know how to reproduce in normal Centos OS linux ...
Please advice in detailed....
# 12  
Old 03-29-2014
I have a hard time believing that what you say is true. But if it is true the most probably source of the strange behavior is the file /etc/pam.d/su and this is a text file that you can examine and modify with an editor. Compare the file on the strange OS with the file on the normal OS. If they are different try copying the file from the strange to the normal.

If this works please post the contents of the file. It will only be a few lines.
# 13  
Old 03-29-2014
Hi.

I don't know amything about pam, but going with the reply from Perderabo, on a system such as:
Code:
OS, ker|rel, machine: Linux, 2.6.32-358.23.2.el6.centos.plus.x86_64, x86_64
Distribution        : CentOS 6.4 (Final)

The 2 su's behave similarly:
Code:
vm-centos ~ $ su -
Password: 
root vm-centos ~ $ pwd
/root
root vm-centos ~ $ exit
logout
vm-centos ~ $ su - root
Password: 
root vm-centos ~ $ pwd
/root

And here is the content of file /etc/pam.d/su for comparison:
Code:
$ cat /etc/pam.d/su
#%PAM-1.0
auth		sufficient	pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth		sufficient	pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
#auth		required	pam_wheel.so use_uid
auth		include		system-auth
account		sufficient	pam_succeed_if.so uid = 0 use_uid quiet
account		include		system-auth
password	include		system-auth
session		include		system-auth
session		optional	pam_xauth.so

Good luck ... cheers, drl
# 14  
Old 03-29-2014
Hi,
What is function of below line ????


account sufficient pam_succeed_if.so uid = 0 use_uid quiet
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Migration of system having UFS root FS with zones root to ZFS root FS

Hi All After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Discussion started by: sb200
2 Replies

2. AIX

why I cannot login by root

I can use sudo su to root from my user id through ssh. Also can change root password. However, I cannnot login by root from ssh. Does any body know why? (10 Replies)
Discussion started by: rainbow_bean
10 Replies

3. HP-UX

Cannot login root

With my SSH, my HP-UX cannot login to root. It will come out a message su: unknown id: root. But I can login by user oracle. I also cannot login to console either by using root or oracle anymore. What shall I do. (5 Replies)
Discussion started by: surizan
5 Replies

4. AIX

Can't login root account due to can't find root shell

Hi, yesterday, I changed root's shell in /etc/passwd, cause a mistake then I can not log in root account (can't find correct shell). I attempted to log in single-mode, however, it prompted for single-mode's password then I type root's password but still can not log in. I'm using AIX 5L version 5.2... (2 Replies)
Discussion started by: neikel
2 Replies

5. Solaris

How to allow root login from a specified terminal ?

I want to enable root login just from one terminal machine, can i do that via /etc/default/login in console=/dev/console line ? and if so what i have to type exactly, another question is it normal to edit the files inside defaults directly ? or i can copy it to /etc/ and edit it there and its... (3 Replies)
Discussion started by: XP_2600
3 Replies

6. Solaris

Root login password

Hello all, I've a problem with root login password in Solaris. After I installed a patch the root password became empty, so to login as root I don't have to type any password, just username: root. I've tried the passwd command but it still doesn't work... Does anyone knows how can I solve this?... (1 Reply)
Discussion started by: pmpx
1 Replies

7. UNIX for Dummies Questions & Answers

Run non-root script as root with non-root environment

All, I want to run a non-root script as the root user with non-root environment variables with crontab. The non-root user would have environment variables for database access such as Oracle or Sybase. The root user does not have the Oracle or Sybase enviroment variables. I thought you could do... (2 Replies)
Discussion started by: bubba112557
2 Replies

8. AIX

root login

How do I make it so user "root" can not log directly into an AIX server? I want a user to be able to SU to it but not log into it to keep a log (2 Replies)
Discussion started by: breigner
2 Replies

9. Answers to Frequently Asked Questions

Lost root password / Can't login as root

We have quite a few threads about this subject. I have collected some of them and arranged them by the OS which is primarily discussed in the thread. That is because the exact procedure depends on the OS involved. What's more, since you often need to interact with the boot process, the... (0 Replies)
Discussion started by: Perderabo
0 Replies

10. IP Networking

root login password

Hello Guys, We are using Sco Unix 5.0 While we was changing root password from scoadmin, It did not change the password and hang in between. Now, I am unable to login as root user pls. do suggest me how can i skip root password and how can i goto root to change the password again. Or if... (4 Replies)
Discussion started by: subho77
4 Replies
Login or Register to Ask a Question