![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Security Discuss UNIX and Linux computer and network security, cybersecurity, cyberattacks, IT security, CISSP, OWASP and more. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| changing user password | mayge | AIX | 0 | 07-12-2006 12:08 PM |
| Changing user profile - Newbie question | panchopp | AIX | 1 | 03-24-2006 04:54 PM |
| Hostname lost when changing user | Pablo_BR | UNIX for Dummies Questions & Answers | 4 | 01-31-2006 08:52 PM |
| Changing the Effective Group ID | Jody | UNIX for Dummies Questions & Answers | 2 | 12-05-2002 03:53 PM |
| Changing permissions of a user | achink125 | UNIX for Advanced & Expert Users | 3 | 06-03-2002 03:11 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Changing effective user
I would like to give execution rights for a script to one user. (that's the easy part...)
When that user is running the script, I would like the effective user ID to be that of the file-owner. Is this possible? |
|
|||||
|
It suid bit controls the switch of the effective uid. The sticky bit has nothing to do with it. And modern kernels will ignore the suid and sgid bits when executing scripts.
There is a program called "sudo" that can let a user run a script with another uid's authority. That is what I would recommend. sudo is a public domain program available from various archive sites. |
|
||||
|
Does anybody knows were could i find this "sudo" program or could point me on an easy way to execute commands inside a script being a different user.
Quote:
|
|
|||||
|
http://www.courtesan.com/sudo/
If you want to log in to another server within a script (I have a feeling this will be the next question) , and as long as you're not too worried about security, check out http://expect.nist.gov for Expect and samples. Also, search this site for .netrc . Have fun! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|