executing su under Python
Boyd Roberts
boyd at insultant.net
Wed Sep 26 09:51:41 EDT 2001
"Brett Cannon" <bac at OCF.Berkeley.EDU> a écrit dans le message news:
Pine.SOL.4.40.0109251312320.10360-100000 at firestorm.OCF.Berkeley.EDU...
> I am trying to execute this line under Solaris 8:
> su bac -c "lp /tmp/bac.print"
>
> The trouble I keep running into is when I try to pass in my password.
su calls getpass which reads /dev/tty. you might be able to fool
it with a pty or some other trickery but i think you have to ask
yourself:
is there a better way to do this?
More information about the Python-list
mailing list