1758306 Members
2672 Online
108868 Solutions
New Discussion юеВ

Root Password

 
Tim Martens
Occasional Contributor

Root Password

How do I put a password on Rootso when people su _ root it ask for a password
8 REPLIES 8
Kofi ARTHIABAH
Honored Contributor

Re: Root Password

Tim:

su - root should always ask for a password, unless you are logged in as root. If you are logged in as any other user, it will ask you for a password.

HOWEVER, if you are root, you can su to any account without a password.
nothing wrong with me that a few lines of code cannot fix!
Rick Garland
Honored Contributor

Re: Root Password

Are you making this account UID=0? If so, it will ask for a passwd execpt coming from root.

There are a lot of previous posts regarding the multiple UID=0 accts. Do a SEARCH for additional info.
Rick Garland
Honored Contributor

Re: Root Password

Assuming that this is a new acct, issue the passwd root_so command to associate a passwd with the acct as well.
Kofi ARTHIABAH
Honored Contributor

Re: Root Password

Tim: Like Rick mentioned, check your /etc/passwd and make sure that people in the bin group DO NOT have a UID of 0. That would explain why they can su - without a passwd. By the way, you might also want to do a find / -name "su" -print to search if there are other scripts called su that are executed instead of the normal su. another check is to list your aliases ie. alias to make sure that there isn't a substitute for su in there.

Good luck
nothing wrong with me that a few lines of code cannot fix!
Rick Garland
Honored Contributor

Re: Root Password

Being in the 'bin' group - that could be an issue.

For the SQL prompt, is the environment being called from root?
augusto cossa
Frequent Advisor

Re: Root Password

Tim,

I think that you will have to modify your .rhosts by removing the (+) which allow the user to do rlogin whitout being asked for password.

Try it.

Augusto
Rick Garland
Honored Contributor

Re: Root Password

The rhost is not a group. You can find/place .rhosts in the following locations.
$HOME/.rhosts

This allows users to rlogin to other remote trusted systems without the use of passwds. For a user, they will rlogin to a new server as themselves without a passwd. For the root user, be careful as the root account now has access to all remote trusted systems without a passwd.

Check the inetd.sec man pages as well. There is a lot you can do with the security.
f. halili
Trusted Contributor

Re: Root Password

Your "bin" group has two users, bin and root.
If the application is logged in as root then su won't prompt you for a password.
If it is logged in as bin.
1 ) Check if bin has a user ID of 0.
# more /etc/passwd | grep "bin:"

$ more /etc/passwd | grep "bin:"
bin:*:2:2::/usr/bin:/sbin/sh

If bin has a UID of 0 then making an su to root wont prompt you a password.

2) Check the .rhost files in your root user's home directory and your bin user's home directory if it at a + sign then they could rlogin back and forth w/o password.

# cd /usr/bin
# more .rhosts

# cd /
# more .rhosts



derekh