Loading ...
Sorry, an error occurred while loading the content.

Strange problems with screen and cron

Expand Messages
  • Tim Walker
    I ve found some unexpected things happening with screen and cron on my Unslung NSLU2. I thought the problems might not be specific to the Unslung versions of
    Message 1 of 2 , Dec 2, 2006
    • 0 Attachment
      I've found some unexpected things happening with screen and cron on my
      Unslung NSLU2. I thought the problems might not be specific to the
      Unslung versions of the applications, and Googled around for
      solutions, but what I found hasn't shed much light on the issues in
      hand. Can anyone suggest what to do?

      SCREEN

      Recently, when I try and start screen in my own user account (i.e not
      root), I have been seeing the error message

      "No more PTYs", then "Sorry, could not find a PTY."

      Googling for this problem, I read of two possible fixes for it:

      (1) Ask your system administrator to add more PTYs to the system.

      Well, I **am** the administrator here :-) What little I could find on
      creating more PTYs (e.g.
      http://www.linuxfromscratch.org/lfs/faq.html#no-ptys) looked very
      technical, and seemed to imply that it might involve recompiling the
      kernel - the sort of thing I try and avoid doing unless I have to,
      especially on this kind of device. Is trying to add more PTYs a good
      idea here, and if so, how?

      (2) Check the permissions of the PTYs (in /dev/).

      Running 'ls -al /dev/pty*' as root gave me this:

      crw-rw-rw- 1 root root 2, 0 Nov 20 17:46 /dev/ptyp0
      crw-r--r-- 1 root root 2, 1 Dec 2 10:33 /dev/ptyp1
      crw-r--r-- 1 root root 2, 2 Jan 1 1970 /dev/ptyp2
      crw-r--r-- 1 root root 2, 3 Jan 1 1970 /dev/ptyp3
      crw-r--r-- 1 root root 2, 4 Jan 1 1970 /dev/ptyp4
      crw-r--r-- 1 root root 2, 5 Jan 1 1970 /dev/ptyp5
      crw-r--r-- 1 root root 2, 6 Jan 1 1970 /dev/ptyp6
      crw-r--r-- 1 root root 2, 7 Jan 1 1970 /dev/ptyp7
      crw-r--r-- 1 root root 2, 8 Jan 1 1970 /dev/ptyp8
      crw-r--r-- 1 root root 2, 9 Jan 1 1970 /dev/ptyp9

      Does this shed any light on the situation for anyone? I noticed that
      /dev/ptyp0 seems different from the others - also, I can run screen as
      root, just not as an unprivileged user.

      CRON

      I installed cron from the package feed, and found that I can set up
      cron jobs as root. However, running under my own user account, when I
      try and run any 'crontab' command, I see this:

      You (tim) are not allowed to use this program (crontab)
      See crontab(1) for more information

      The crontab man page says that users wishing to use crontab must
      either be listed in /etc/cron.allow, or NOT be listed in
      /etc/cron.deny. I saw that /etc/cron.deny didn't exist, so I created
      /etc/cron.allow and added the user accounts I wanted to allow cron
      jobs for. For good measure, I symlinked it to /opt/etc/cron.allow, and
      restarted crond.

      All to no avail - I still can't use crontab, and get the message
      above. Any thoughts?

      Many thanks for any help you can give :-)

      Best regards,
      Tim.
    • Tim Walker
      Hi again, Apologies if it s considered bad form around here to bump old posts, but I was wondering if anyone had any thoughts on either of these problems? I
      Message 2 of 2 , Dec 6, 2006
      • 0 Attachment
        Hi again,

        Apologies if it's considered bad form around here to 'bump' old posts,
        but I was wondering if anyone had any thoughts on either of these
        problems?

        I really have tried to find the answers myself, but have reached dead
        ends, and both problems are proving real obstacles to proceeding
        further with a number of things I want to do with the slug (esp. as I
        currently can't set up cron jobs for my own user account - 'crontab'
        tells me I'm not allowed to use it).

        Thanks again for any suggestions you may have - I really appreciate
        the help.

        All the best,
        Tim.

        --- In nslu2-linux@yahoogroups.com, "Tim Walker" <tawalker2@...> wrote:
        >
        > I've found some unexpected things happening with screen and cron on my
        > Unslung NSLU2. I thought the problems might not be specific to the
        > Unslung versions of the applications, and Googled around for
        > solutions, but what I found hasn't shed much light on the issues in
        > hand. Can anyone suggest what to do?
        >
        > SCREEN
        >
        > Recently, when I try and start screen in my own user account (i.e not
        > root), I have been seeing the error message
        >
        > "No more PTYs", then "Sorry, could not find a PTY."
        >
        > Googling for this problem, I read of two possible fixes for it:
        >
        > (1) Ask your system administrator to add more PTYs to the system.
        >
        > Well, I **am** the administrator here :-) What little I could find on
        > creating more PTYs (e.g.
        > http://www.linuxfromscratch.org/lfs/faq.html#no-ptys) looked very
        > technical, and seemed to imply that it might involve recompiling the
        > kernel - the sort of thing I try and avoid doing unless I have to,
        > especially on this kind of device. Is trying to add more PTYs a good
        > idea here, and if so, how?
        >
        > (2) Check the permissions of the PTYs (in /dev/).
        >
        > Running 'ls -al /dev/pty*' as root gave me this:
        >
        > crw-rw-rw- 1 root root 2, 0 Nov 20 17:46 /dev/ptyp0
        > crw-r--r-- 1 root root 2, 1 Dec 2 10:33 /dev/ptyp1
        > crw-r--r-- 1 root root 2, 2 Jan 1 1970 /dev/ptyp2
        > crw-r--r-- 1 root root 2, 3 Jan 1 1970 /dev/ptyp3
        > crw-r--r-- 1 root root 2, 4 Jan 1 1970 /dev/ptyp4
        > crw-r--r-- 1 root root 2, 5 Jan 1 1970 /dev/ptyp5
        > crw-r--r-- 1 root root 2, 6 Jan 1 1970 /dev/ptyp6
        > crw-r--r-- 1 root root 2, 7 Jan 1 1970 /dev/ptyp7
        > crw-r--r-- 1 root root 2, 8 Jan 1 1970 /dev/ptyp8
        > crw-r--r-- 1 root root 2, 9 Jan 1 1970 /dev/ptyp9
        >
        > Does this shed any light on the situation for anyone? I noticed that
        > /dev/ptyp0 seems different from the others - also, I can run screen as
        > root, just not as an unprivileged user.
        >
        > CRON
        >
        > I installed cron from the package feed, and found that I can set up
        > cron jobs as root. However, running under my own user account, when I
        > try and run any 'crontab' command, I see this:
        >
        > You (tim) are not allowed to use this program (crontab)
        > See crontab(1) for more information
        >
        > The crontab man page says that users wishing to use crontab must
        > either be listed in /etc/cron.allow, or NOT be listed in
        > /etc/cron.deny. I saw that /etc/cron.deny didn't exist, so I created
        > /etc/cron.allow and added the user accounts I wanted to allow cron
        > jobs for. For good measure, I symlinked it to /opt/etc/cron.allow, and
        > restarted crond.
        >
        > All to no avail - I still can't use crontab, and get the message
        > above. Any thoughts?
        >
        > Many thanks for any help you can give :-)
        >
        > Best regards,
        > Tim.
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.