Recently on a Solaris 8 box when I executed this command, I go the error unable to get pty
$ /usr/dt/bin/dtterm &
$ grantpt: Error 0
unable to get pty
A google search returned this link from docs.sun.com:
unable to get pty!
When trying to open a Terminal window (dtterm) in CDE, a pop-up window appears stating, Unable to get pty!
dtterm is not able to open /dev/pts/int (where int is an integer). The user cannot open this file because grantpt(3C) failed to change the permissions on the file. grantpt(3C) failed because the binary /usr/lib/pt_chmod is not setuid root. The permissions on /usr/lib/pt_chmod must be 4111.
To restore the correct permissions to pt_chmod, use the following command (as root):
# chmod 4111 /usr/lib/pt_chmod
So I logged in as root and executed the above command.
Issue was resolved.