Sponsored Content
Full Discussion: Changing effective user
Special Forums Cybersecurity Changing effective user Post 11454 by raleman on Wednesday 5th of December 2001 03:19:17 PM
Old 12-05-2001
Data Where could i find "sudo"

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:
Originally posted by Perderabo
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.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Changing permissions of a user

So I need to change the permissions of my user account. I can access the root account on the server, but don't know how to change the permissions of my user account. I was advised to try 'userconf' to see if I am part of a group, but I dunno how that works. ANyone who knows how to see the... (3 Replies)
Discussion started by: achink125
3 Replies

2. UNIX for Dummies Questions & Answers

Changing the Effective Group ID

Here is my situation. On a RedHat 7.3 box, I have a user named jody. When I log in with jody and type in "id", I get the expected output: uid=1(jody) gid=1(jody) groups=1(jody), 510(test) However, I cannot figure which "id" option allows me to change the effective gid. I tried the options... (2 Replies)
Discussion started by: Jody
2 Replies

3. AIX

changing user password

I have 02 servers: - Linux RHEL AS 3 (server1) - AIX 5.2 (server2) Running the command rsh server2 passwd derje from the server1 to change derje user password on server2, give me this error: 3004-709 Error while changing the password for "derje" Can somebody help me ? (0 Replies)
Discussion started by: mayge
0 Replies

4. AIX

Changing User Characteristics

We use smitty to administer user accounts. Is it safe to make changes to the characteristics of a user while the user is logged in? Can I set "Is this user ACCOUNT LOCKED?" to true ? Can I set an expiration date on an account? Will this effect the user in anyway during their current... (1 Reply)
Discussion started by: andrewsc
1 Replies

5. Solaris

Solaris user changing password

i created 1 user . Now its passwd time period get expired. Now how can I set password for that user. Also how can I set a condition such a way that after every 3 months user must change his passwd. (5 Replies)
Discussion started by: ajitkraj
5 Replies

6. UNIX for Dummies Questions & Answers

Changing the user id or euid of the shell itself

Hi all, Ok, bear with me on this one, I am a bit new to Unix and it might take me a little bit of time to articulate my question. I know that every process has a user id and an effective user id. This seems to include the shell itself, because when I type 'ps', I see 'bash' listed as a... (2 Replies)
Discussion started by: oddthingy
2 Replies

7. UNIX for Dummies Questions & Answers

[Solved] effective user id upon exec

Hello all. Despite the exec man page, the exec system call seems to turn my effective-user-id into my real-user-id. I coded and compiled 2 very simple c programs as user 1 (uid=501) The first one (A) prints real and effective user IDs and then execs the second one (B), which in turn prints... (7 Replies)
Discussion started by: oviv
7 Replies

8. Shell Programming and Scripting

User id who is changing the script.

can we know the user id who changed saved script in cron tab..:D (7 Replies)
Discussion started by: netdbaind
7 Replies

9. Shell Programming and Scripting

Prevent the user from changing his directory

Hi could some let me know how to prevent user from changing his home directory....... Thanks in advance.... (1 Reply)
Discussion started by: Revanth547
1 Replies

10. Programming

Real, effective and saved user id in C program

I figured it out by now. (0 Replies)
Discussion started by: Ralph
0 Replies
setuid(2)							System Calls Manual							 setuid(2)

NAME
setuid(), setgid() - set user and group IDs SYNOPSIS
DESCRIPTION
sets the real-user-ID (ruid), effective-user-ID (euid), and/or saved-user-ID (suid) of the calling process. If the Security Containment product is installed, these interfaces treat a process observing as a privileged process. Otherwise, only processes with an euid of zero are treated as privileged processes. See privileges(5) for more information on Security Containment and fine-grained privileges. The following conditions govern setuid's behavior: o If the process is privileged, sets the ruid, euid, and suid to uid. o If the process is not privileged and the argument uid is equal to the ruid or the suid, sets the euid to uid; the ruid and suid remain unchanged. (If a set-user-ID program is not running as superuser, it can change its euid to match its ruid and reset itself to the previous euid value.) o If the process is not privileged, the argument uid is equal to the euid, and the calling process has the privilege, sets the ruid to uid; the euid and suid remain unchanged. sets the real-group-ID (rgid), effective-group-ID (egid), and/or saved-group-ID (sgid) of the calling process. The following conditions govern behavior: o If the process is privileged, sets the rgid and egid to gid. o If the process is not privileged and the argument gid is equal to the rgid or the sgid, sets the egid to gid; the rgid and sgid remain unchanged. o If the process is not privileged, the argument gid is equal to the egid, and the calling process has the privilege, sets the rgid to gid; the egid and sgid remain unchanged. Security Restrictions Some or all of the actions associated with this system call require the privilege. Processes owned by the superuser have this privilege. Processes owned by other users may have this privilege, depending on system configuration. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUE
Upon successful completion, and return 0; otherwise, they return -1 and set to indicate the error. ERRORS
and fail and return -1 if any of the following conditions are encountered: None of the conditions above are met. uid (gid) is not a valid user (group) ID. WARNINGS
It is recommended that the capability be avoided, as it is provided for backward compatibility. This feature may be modified or dropped from future HP-UX releases. When changing the real user ID and real group ID, use of and (see setresuid(2)) is recommended instead. AUTHOR
was developed by AT&T, the University of California, Berkeley, and HP. was developed by AT&T. SEE ALSO
exec(2), getuid(2), setresuid(2), privileges(5). STANDARDS CONFORMANCE
setuid(2)
All times are GMT -4. The time now is 10:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy