Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to prevent user to su without loading the .profile

Status
Not open for further replies.

LoYeah

Technical User
May 12, 2003
15
HK
Hi,

Is there any solution that can prevent user to su without loading the .profile. i.e su user will not exec the .profile.

Thanks
 
Yep.

su - username will invoke that users .profile.

su username will NOT invoke that users .profile
 
Hi all,

Because of security reason, we need to restrict the use of su username. It there any method I can do?

 
you can restrict to su to a user with smit.
set 'Another user can SU TO USER?' false from change show characteristics of a user.

Baanman
 
Instead of aliasing su="su -" which will not get your intended result, why not alias su as a different command so that users will not know to use the - flag? Or why not create a program or script with another name so that the - flag cannot be used? You could then audit the users' history and make sure they are not using su improperly.

[morning] needcoffee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top