/dev/tty: no such device or address

Latest response

Trying to bring Microstrategy IntelligenceServer up on reboot. it needs to be owned by user "mstrsys". The startup script has a variable
"MSTR_SERVICE_RUN_AS_USER" that can be set to "mstrsys". When that is set, start script does a "su mstrsys 2>/dev/tty -c " to execute the MSTR_SERVICE_START_COMMAND as user mstrsys. Startup fails with error message "/dev/tty: no such device or address". When I leave the variable "MSTR_SERVICE_RUN_AS_USER" and allow the script to run as root, it just runs the MSTR_SERVICE_START_COMMAND as root and it comes up fine. Problem is that user mstrsys can't manipulate service when it is owned by root.

I can run it fine as root from the command line as root with the MSTR_SERVICE_RUN_AS_USER set to mstrsys and it comes up owned by user mstrsys. It only fails when MSTR_SERVICE_RUN_AS_USER is set during reboot. Any ideas?

Responses

This is happening to us also in RHEL7. Any solution welcome

Did you ever resolve this issue? I ended up running a script at system boot that ran the start script as mstrsys and everything works great. Problem is that it's just an extra step. Just curious if you ever found a resolution.

Hey, look, it's the exact error I'm trying to resolve too! I might end up writing a systemd unit file to do it right.

I finally was able to get Microstrategy support to look at this. Their fix is to edit the init script and replace '2>/dev/tty' with '2>&1' on/around line 65. This did work for me, I can now run the daemon as the mstr user at boot. Hope this helps someone.

Oh, I also needed to add the mstr user to the wheel group and then run: sed -i '/pam_wheel.so\ trust\ use_uid/s/^#//' /etc/pam.d/su

This isn't great security practice, of course. But it works for us.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.