su -m <user> passwordless?

Hi!

I am working on mac osx and have a script which prompts for password for a non-root user, can I avoid that?

su -m <user>
Prompts for a password.

Its a startup script and the start up fails?

How can I fix this?

Thanks,
Jack.

sudo is probably the best idea, I think it's available for Mac OSX

1 Like

ssh is another way.

or just use expect to handle interactive prompts

@Chubler_XL Yes there is a sudo on mac os.