Sponsored Content
Full Discussion: Cannot su to a user in AIX
Operating Systems AIX Cannot su to a user in AIX Post 302766111 by bakunin on Monday 4th of February 2013 08:21:08 AM
Old 02-04-2013
citroen is correct: the error doesn't come from "su" but from the login process of the user. Possible candidates are: the file "~/.profile" and the file "~/.cshrc".

The difference between "su - user" and "su user" is that "su - user" sets the complete environment for the new user you switch to while "su user" just changes the "effective user ID" and not the environment. If userA does a "su - userB" the session will still have the environment of "userA", but all the privileges of "userB".

I hope this helps.

bakunin
 

10 More Discussions You Might Find Interesting

1. AIX

User ID (UID) in AIX

what is the upper limit for UID is AIX 5.3 ? (1 Reply)
Discussion started by: learner
1 Replies

2. UNIX for Dummies Questions & Answers

AIX.4 New User Help

I am sure someone will yell at me over this post, but honestly I have searched. It doesn't help that I am not sure what to search on. Little background. Working at new company, Company has a program on a Unix box AIX.4. I know virtually nothing about Unix and Neither does anyone else here ... (1 Reply)
Discussion started by: swoozie
1 Replies

3. AIX

AIX Virtualization question for non-AIX user

Hello, My first post to the Unix forums, thanks for having me! The division of the company I work for uses a xseries/redhat/VMWareServer solution to make sure that we keep hardware overhead low and use our machines to as near capacity as we can. These boxes are Intel with usually dual or... (1 Reply)
Discussion started by: greenteabagger
1 Replies

4. UNIX for Dummies Questions & Answers

User stuck in AIX

Hello guys, new here so please take it easy on me :-). Here is my issue. We use an application called Medical Manager and it runs on AIX. There is a user that is showing stuck with in the application. However when I try to run any of "ps" commands I don't see it. I need to kill this user and I... (2 Replies)
Discussion started by: mali77
2 Replies

5. UNIX for Advanced & Expert Users

Switching user in AIX 5

I need to do a switch user in an automated mode and do a ftp using that switched id. Scenario: initial login xx. switch to user-yy without manually entering the password. ftp some files from user yy to another user zz - automated mode. Can any unix experts can help me for my above query? (1 Reply)
Discussion started by: mjdarm
1 Replies

6. AIX

user cannot login into AIX-6.1 server

Dear Friends , I got a problem In our AIX 6.1 server . When I start or restart the machine I cannot Login the server . It shows a dialog box and shows some comments , those are : >> The DT messaging system could not be started . To correct the problem : 1. Choose to return the login... (1 Reply)
Discussion started by: shipon_97
1 Replies

7. AIX

cant su to user or root AIX 5.3

Hi all, I cannt use 'su' to login to root or any other users though everything seems ok. I read some articles that says if you do recursive chmod 777 on /usr it can create this problem. I did the same. can anybody tell me how to repair it. Any ideas will be appreciated. thnks (7 Replies)
Discussion started by: itesh.dash
7 Replies

8. AIX

Limit a user on AIX

Hello, Sorry for my poor English. I have to reduce rights for a user on AIX system so that: When he does , he find in output, only filesystems on which he has permissions .He can't do to change user. Very thanks for helping. (2 Replies)
Discussion started by: edosseh
2 Replies

9. UNIX for Dummies Questions & Answers

Read-only user in AIX

Hi, I want to create a new user,and I want to give read permission to a folder which owned by root. How can I do this? thanks for your helps (4 Replies)
Discussion started by: sersoy
4 Replies

10. AIX

User restriction on C/C++ compiler on AIX

Hello, I am curious that is there a way I can restrict a user or a set of users to execute the C/C++ compiler, basically what I want is to lock it down to a particular user and none of the other users should be able to compile any code. Thanks in advance. (14 Replies)
Discussion started by: m6248m
14 Replies
setreuid(2)							   System Calls 						       setreuid(2)

NAME
setreuid - set real and effective user IDs SYNOPSIS
#include <unistd.h> int setreuid(uid_t ruid, uid_t euid); DESCRIPTION
The setreuid() function is used to set the real and effective user IDs of the calling process. If ruid is -1, the real user ID is not changed; if euid is -1, the effective user ID is not changed. The real and effective user IDs may be set to different values in the same call. If the {PRIV_PROC_SETID} privilege is asserted in the effective set of the calling process, the real user ID and the effective user ID can be set to any legal value. If the {PRIV_PROC_SETID} privilege is not asserted in the effective set of the calling process, either the real user ID can be set to the effective user ID, or the effective user ID can either be set to the saved set-user ID from execve() (seeexec(2)) or the real user ID. In either case, if the real user ID is being changed (that is, if ruid is not -1), or the effective user ID is being changed to a value not equal to the real user ID, the saved set-user ID is set equal to the new effective user ID. All privileges are required to change to uid 0. RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is returned, errno is set to indicate the error, and neither of the user IDs will be changed. ERRORS
The setreuid() function will fail if: EINVAL The value of ruid or euid is less than 0 or greater than UID_MAX (defined in <limits.h>). EPERM The {PRIV_PROC_SETID} privilege is not asserted in the effective set of the calling processes and a change was specified other than changing the real user ID to the effective user ID, or changing the effective user ID to the real user ID or the saved set- user ID. See privileges(5) for additional restrictions which apply when changing to UID 0. USAGE
If a set-user-ID process sets its effective user ID to its real user ID, it can still set its effective user ID back to the saved set-user ID. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
exec(2), getuid(2), setregid(2), setuid(2), attributes(5), privileges(5), standards(5) SunOS 5.11 22 Mar 2004 setreuid(2)
All times are GMT -4. The time now is 06:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy