Project

General

Profile

Bug #3206

Long(er) username crontab setup failure

Added by Predrag Zečević about 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2012-09-19
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Hi,

OS:
$ head -1 /etc/release
OpenIndiana Development oi_151.1.6 X86 (powered by illumos)

i have create user:
$ /usr/bin/id
uid=1961(predrag_zecevic) gid=1961(admin)

As you may see, useradd command created user (although it was complaining):
$ pfexec useradd -u 1961 predrag_zecevic
UX: useradd: predrag_zecevic name too long.

When i try to create crontab file:
$ crontab -e

  1. I have entered here something, not relevant for problem...
    :wq!

$ less /var/cron/log
...

! No such user as predrag_zecevicpredrag_z<F0><FE><80><B2><ED><FE>X<A3>YP,^A - cron entries not created Wed Sep 19 12:53:55 2012

$ ls al /var/spool/cron/crontabs/ | grep predrag_zecevic
-rw------
1 root admin 1.6K 2012-09-19 12:53 predrag_zecevic
r------- 1 root admin 51 2012-09-19 12:53 predrag_zecevic.au

Also:
$ cat /etc/cron.d/cron.deny
daemon
bin
nuucp

At the end, crontab content is there BUT is not executed !!!

Is it possible to have crontab executed for user with username longer than 8 characters?

Regards.

#1

Updated by Predrag Zečević about 8 years ago

So,

i have rebooted box, and it has worked.

I guess,

crontab -e

should be effective immediately?

Regards.

#2

Updated by Rich Lowe about 8 years ago

  • Project changed from OpenIndiana Distribution to illumos gate
#3

Updated by Rich Lowe about 8 years ago

  • Category set to cmd - userland programs

The length limits in cron are 8 chars for the log name, and 14 for the file name.

It's not checking these lengths (hence the trash), and these buffers probably should be larger anyway.

#4

Updated by Rich Lowe about 8 years ago

  • Assignee set to Rich Lowe
#5

Updated by Rich Lowe about 8 years ago

The trash is because someone forgot strncpy may not NULL terminate, actually, we do check the limit, we just do it incorrectly.

#6

Updated by Rich Lowe about 8 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
  • Tags deleted (needs-triage)

Resolved in r13847 commit:d79e5216dd27

Also available in: Atom PDF