Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

use su command and specify a shell "on the fly" when a user have /bin/false a default shell

826510Aug 12 2016 — edited Aug 12 2016

hello community!

We have a user with /bin/false as default shell, but we want to be able to launch command with this user "on the fly", by specifying a shell during the command.

 

We know that on linux we can do something like "su user -s /usr/bin/bash -c "touch /tmp/test"

 

but on Solaris 10x86, seems it's not working (nothing happens). I looked at the su man page but didn't help.

 

Do you know how can we do such thing?

The user is an LDAP user with the /bin/false shell. The user is shared between solaris and linux servers.

Thx a lot in advance

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 9 2016
Added on Aug 12 2016
1 comment
713 views