Bug #3206
closedLong(er) username crontab setup failure
100%
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
- 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 1 root admin 1.6K 2012-09-19 12:53 predrag_zecevic
-rw------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.
Updated by Predrag Zečević over 9 years ago
So,
i have rebooted box, and it has worked.
I guess,
crontab -e
should be effective immediately?
Regards.
Updated by Rich Lowe over 9 years ago
- Project changed from OpenIndiana Distribution to illumos gate
Updated by Rich Lowe over 9 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.
Updated by Rich Lowe over 9 years ago
The trash is because someone forgot strncpy may not NULL terminate, actually, we do check the limit, we just do it incorrectly.
Updated by Rich Lowe over 9 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
- Tags deleted (
needs-triage)
Resolved in r13847 commit:d79e5216dd27