su not allowing privilages of new user

su not allowing privilages of new user

Post by Greg » Fri, 15 Sep 2000 12:42:44



Hi,

For some reason, just recently, I have been unable to assume the full
privilages of whatever user account I "su" to.  For instance, when I
am "super user" and I su to "tmosadm", I am unable to look into files
or directories for "tmosadm" (and vice versa).

This has turned more from an annoyance to a serious problem because now
it appears to be preventing some scripts (executed by cron jobs) from
accessing important info from the database, thus, making the data
unavailable.

Below is a mail message that is sent when this happens:

? 5
From root Fri Sep  8 15:10:41 2000
Date: Fri, 8 Sep 2000 15:10:41 -0500 (CDT)
From: Super-User <root>

To: root
Subject: Output from "cron" command
Content-Length: 285

Your "cron" job on msjxswos01
su - tmosadm -cf 'source .login; /opt/tmos/bin/db_dump master
NM_SQL_SERVER'

produced the following output:

find: cannot read dir /var/sybase/dbdumps/lost+found: Permission denied
find: cannot read dir /var/sybase/dbdumps/lost+found: Permission denied

Could you tell me how to fix this problem?  What is the nature of this
problem?

Thanks,

Greg

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

su not allowing privilages of new user

Post by P Lanvi » Fri, 15 Sep 2000 04:00:00



> For some reason, just recently, I have been unable to assume the full
> privilages of whatever user account I "su" to.  For instance, when I
> am "super user" and I su to "tmosadm", I am unable to look into files
> or directories for "tmosadm" (and vice versa).

Check the files /etc/passwd and /etc/shadow
Make sure the UID and the GUID are uniq.

Quote:> This has turned more from an annoyance to a serious problem because now
> it appears to be preventing some scripts (executed by cron jobs) from
> su - tmosadm -cf 'source .login; /opt/tmos/bin/db_dump master

Why do you use su ? Why not put an entry in the crontab for the user
tmosadm ?
If that is not possible, try this

su tmosadm -c "cd; . ./.login; /opt/tmos/bin/db_dump master"

(Also make sure that the file .login complies with cron.)

rgds

/PL