FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 08-19-2010, 12:02 AM
Jim Wildman
 
Default how to setup account which can 'su" to another account (NON-root)?

On Thu, 19 Aug 2010, mcclnx mcc wrote:

> we have CENTOS 5.2 on DELL server. we need allow a user can "su" to another user without password.
>
> for example:
>
> account user1 can "su - user2" without password. (user2 is NOT root)
>

man sudo

----------------------------------------------------------------------
Jim Wildman, CISSP, RHCE jim@rossberry.com http://www.rossberry.com
"Society in every state is a blessing, but Government, even in its best
state, is a necessary evil; in its worst state, an intolerable one."
Thomas Paine
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-19-2010, 12:05 AM
Jay Leafey
 
Default how to setup account which can 'su" to another account (NON-root)?

mcclnx mcc wrote:

we have CENTOS 5.2 on DELL server. we need allow a user can "su" to another user without password.

for example:

account user1 can "su - user2" without password. (user2 is NOT root)

I know this is big security risk but .... Anyone know how to do it?

Thanks.



Check out the sudo command. You can alter the /etc/sudoers file to
specify that the "source" user can only run a command as a specified
"runas" user. The syntax would look something like:


sourceuser ALL = ( runasuser ) command

Let's say you wanted the user "bob" to be able to run the "grep" command
as user "fred". The following line could be added to the /etc/sudoers file:


bob ALL = ( fred ) /bin/grep

"bob" would use the sudo command to execute the grep command:

sudo -u fred /bin/grep 'stuff' logfile

This is a simplistic example, check the man pages for "sudo" and
"sudoers" for more information.

--
Jay Leafey - jay.leafey@mindless.com
Memphis, TN
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 06:44 AM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org