su: No shell/No directory! if sys is added to a users secondary group


 
Thread Tools Search this Thread
Operating Systems Solaris su: No shell/No directory! if sys is added to a users secondary group
# 8  
Old 08-09-2010
My test was without automounter.
You can have home dir's anywhere, so its worth giving it a try.
# 9  
Old 08-09-2010
I changed the directory too, no good I still have the problem

Last edited by agent001; 08-09-2010 at 08:59 AM..
# 10  
Old 08-09-2010
Code:
# svcadm disable svc:/system/filesystem/autofs
# mkdir /home/agent
# su - agent

# 11  
Old 08-09-2010
Do you have any Solaris Recommended Patches installed ?
May be worth trying to install a reasonable level.
Also it may be worth changing the Syslog level to debug and seeing if anything comes out of "su" when you try it.
Then the last thing I would try is to "truss" su on a working box, and on the faulty one and compare the outputs.

I hope this helps...
# 12  
Old 08-09-2010
Hi, in /etc/mnttab "auto_mount" is not mounted, so automounter is not in used and I tried with the truss on this server for the same user with and without "sys" in secondary group. It was helpful, the problem seems to be with the file permission. Do you see any issue with permission here? Also the patch level is SunOS 5.9 Generic_118558-14

Code:
# ls -l /bin/ksh
-r-xr-xr-x   3 root     bin       201076 Aug  9  2005 /bin/ksh
# ls -ld /export/home/taddm
drwxr-x---   3 agent    agent        512 Aug  9 11:19 /export/home/agent

Command su agent, with "sys" in secondary group:
Code:
12100:  execve("/bin/ksh", 0xFFBFEC18, 0xFFBFFD20)      Err#13 EACCES
12100:  fstat64(2, 0xFFBFDD38)                          = 0
12100:  write(2, " s u :   N o   s h e l l".., 13)      = 13
12100:  _exit(3)

Command su agent without "sys" in secondary group:
Code:
11991:  execve("/bin/ksh", 0xFFBFEC18, 0xFFBFFD20)  argc = 1

======

Command su - agent with "sys" in secondary group:
Code:
9711:   setuid(5001)                                      = 0
9711:   chdir("/export/home/taddm")                     Err#13 EACCES
9711:   fstat64(2, 0xFFBFDD30)                          = 0
9711:   write(2, " N o   d i r e c t o r y".., 14)      = 14
9711:   _exit(1)

Command su - agent without "sys" in secondary group:
Code:
10003:  setuid(5001)                                      = 0
10003:  chdir("/export/home/taddm")                     = 0

# 13  
Old 08-09-2010
I would suggest that ksh is trying to execute something from the users home directory and doesnt have access - Try adding "-a" and "-e" to the truss and see what is actually being executed.
Also, are you running RBAC ? There may be ACL's on ksh or the home dir.
# 14  
Old 08-10-2010
Hi citaylor,

The option -ae didn't return any different output with the truss command for these errors lines, they gave the same error without any arguments being passed.
In /etc/user_attr only these three configurations are available. Nothing was defined for ksh and su.

Code:
root::::auths=solaris.*,solaris.grant;profiles=All
lp::::profiles=Printer Management
adm::::profiles=Log Management

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Account added to group

Hi , Is there a way to find out when an account was added to a group in Windows 2003?Could you please tell me how to find that? Regards, Maddy (1 Reply)
Discussion started by: Maddy123
1 Replies

2. UNIX for Dummies Questions & Answers

Remove a secondary group from user (Linux)

Oracle Linux 6.6 grid user's secondary groups are asmadmin,asmdba,asmoper and dba # id -a grid uid=638(grid) gid=2000(oinstall) groups=2000(oinstall),2100(asmadmin),2200(dba),2300(asmdba),2301(asmoper) I want to remove dba as the secondary group for grid and keep the remaining ones. ie. I... (5 Replies)
Discussion started by: John K
5 Replies

3. Linux

Openldap add user to secondary group

Hello, i try to add user john to secondary group, named groupB this will add as primary group, how can i add to secondary group?? dn: cn=groupB,ou=Groups,dc=ldap-server,dc=com changetype: modify add: memberuid memberuid: john (1 Reply)
Discussion started by: prpkrk
1 Replies

4. Red Hat

How to find Secondary Group only?

Hi, I would like to know how to find our secondary group of user only. I have used the command id -Gn user1 it is showing both groups of user. Primary and secondary group. (2 Replies)
Discussion started by: manoj.solaris
2 Replies

5. UNIX for Advanced & Expert Users

creating a secondary read only group with setfacl

We have created ACL's to allow two differnet groups to access some directories. You can see output from getfacl below. group::rwx group:rbauser:r-- The original group has full access, the secondary group has read only. However users in the secondary group can't see the directories. Think this... (1 Reply)
Discussion started by: dw82199
1 Replies

6. Solaris

Secondary group info source

Experts, I know when I use id it shows only the primary group information for the given user, and that info comes from passwd file. When I use groups it shows all groups user are member of, however from where come information given by groups command? grep fmtt3990 /etc/passwd... (6 Replies)
Discussion started by: fmattos
6 Replies

7. UNIX for Dummies Questions & Answers

How many user can be added to single group

Hi There, How many user can be added to a unix single group. I need this for unix and solaris. BRs -----Post Update----- I'm asking about secondary group and not primary group. All the users are having 8 character as their username. value is set for getconf LINE_MAX is... (1 Reply)
Discussion started by: maestromani
1 Replies

8. Shell Programming and Scripting

List ALL users in a Unix Group (Primary and Secondary)

Is there a command or better combination of cmds that will give me the list of Unix users in a particular Unix group whether their primary group is that group in question (information stored in /etc/passwd) or they are in a secondary group (information stored in /etc/group). So far all I got... (5 Replies)
Discussion started by: ckmehta
5 Replies

9. UNIX for Dummies Questions & Answers

Assigning existing users to a secondary group

Hi!!, I am on HP UX -11. I have created a new group and want to assign some the users to this group without changing their existing group ( The new group is the secondary group for them) Any ideas how to do it?? SAM doesnt seem to be working.. Any way of doing it from command line?? ... (1 Reply)
Discussion started by: jyotipg
1 Replies

10. UNIX for Dummies Questions & Answers

How to find All Primary and Secondary Group ID's for a user

Is there any command which can list me all the Group ID's (Primary, Secondary ) assocaited with a single user. Thanks Sanjay (2 Replies)
Discussion started by: sanjay92
2 Replies
Login or Register to Ask a Question