[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SOLARIS: su - user not passing cmd args



Did you put the args in quotes?
i.e.
su - myadmin -c "echo Y|/export/home/myadmin/thing2do"

--- mike808@users.sourceforge.net wrote:
> > unix is unix, right?  /me ducks and runs for cover
> 
> But this is 'su' and 'login' and 'sh/ksh/bash' interaction.
> All legit user-space stuff.
> 
> > first question, what does the /etc/passwd entry look like for this 
> > account?  do they have a shell or are they using /bin/false?
> 
> The default shell is /bin/ksh, which is why I'm trying to detect in the
> .profile that it's a login shell and switch to bash. I don't want to switch
> when they really want a ksh instance, such as in a script.
> 
> bash ignores the .profile (running .bash_profile instead), so this is safe.
> 
> I can detect the login shell (i.e. $0 == '-ksh'), but no arguments, so I
> can't pass them to the replacement bash (i.e. exec bash --login "$@").
> 
> > Tell me if you have used the following tags: 
> > -l or --login to make it read the .profile.
> > -s or --shell=/bin/bash to make it use bash instead of whatever you are 
> > getting when you su.
> 
> What tags? 'su' doesn't take those options on Solaris. You must be mistaking 
> this for a Linux question. This is Solaris' 'su', not some fancy-schmancy 
> Linux version on steroids. You did see the big "SOLARIS" in the subject line, 
> no? :=)
> 
> Mike/
> 
> ---------------------------------------------
> http://www.valuenet.net
> 
> 
> 
> -
> To unsubscribe, send email to majordomo@silug.org with
> "unsubscribe silug-discuss" in the body.


=====
http://linux.usi.edu:8080/LUG  Web Log
http://linux.usi.edu/rat/  My Page

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.