Operating System - HP-UX
1850507 Members
2150 Online
104054 Solutions
New Discussion

message when loggin in root

 
SOLVED
Go to solution
f. halili
Trusted Contributor

message when loggin in root

When i login to root i get this message:

awk: Input line root 0 0 3 root 1 0 cannot be longer than 3,000 bytes.
The source line number is 1.

How do I fix this???
derekh
19 REPLIES 19
Andreas Voss
Honored Contributor

Re: message when loggin in root

Look in /.profile if there is an awk command.
Rick Garland
Honored Contributor
Solution

Re: message when loggin in root

Looks like the root profile has a command in it that calls awk and the syntax for awk is incorrect. Trying to make awk read too much than it is capable of.

You can remove the awk portion from the profile and work on it outside of the profile.
You may need some record separators (RS) in the awk syntax. This is just a guess.

The profile is looking at awk though.
Alex Glennie
Honored Contributor

Re: message when loggin in root

Just in case you need awk in your .profile :

the 3000 limit cannot be changed : =>

why awk cannot handle lines greater than 3000 char :

The POSIX standard requires at least LINE_MAX characters, which is
defined as 2k (2048) - this is the generic minimum limit you can
expect for a text processing tool. In the case of our awk(1) -
which is historically based on nawk(1) - we have the limit of 3k.
>From awk.h in the source:

#if defined LINE_MAX
#define RECSIZE LINE_MAX /* POSIX 1003.2 buffer size */
#else
#define RECSIZE (3 * 1024) /* sets limit on records, fields, etc.,
etc. */
#endif

And LINE_MAX is defined in limits(4) (ie the file):

# define LINE_MAX 2048 /* Expected length in bytes of a
utility's input line when
input is from text files */

This is a limit we cannot change without recompiling awk(1).
f. halili
Trusted Contributor

Re: message when loggin in root

there are no awk lines in the profile.

when you login as root you see the message.
when you su - root you don't see the message.
derekh
Rick Garland
Honored Contributor

Re: message when loggin in root

Somehow, somewhere, awk is being called. Is it just with the root login?
Could other login accts be having this issue as well? If so, check the /etc/profile.
Another place could be the .kshrc (ksh) or the .cshrc (csh). Look into these files if they are being used.

It would seem highly likely that awk is being called from somewhere.
f. halili
Trusted Contributor

Re: message when loggin in root

rick -

other accounts are okey. the /etc/profile doesn't call awk. i get this message only as root user, at login.... hmmmm
derekh
Rick Garland
Honored Contributor

Re: message when loggin in root

Maybe put a set -x in the profile and then loggin as root. The set -x will help you see how and where the script is running and what it is calling.
Tom Danzig
Honored Contributor

Re: message when loggin in root

Just a hunch...

From the look of the error, it may be that somewhere in the login files, awk is parsing /etc/group using a ":" as a field separator. See if you have a group "root" with a bunch of users in that group (which would be strange though?). If by chance this is the case, you can split up the "root" group on multiple lines.
Tom Danzig
Honored Contributor

Re: message when loggin in root

PS: Are you logging in as root through CDE?
f. halili
Trusted Contributor

Re: message when loggin in root

TOM,
root is the only id in the group root:

root::0:root

I login via vue. The message however appears even in the console.
derekh
CHRIS_ANORUO
Honored Contributor

Re: message when loggin in root

Check .vueprofile
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
f. halili
Trusted Contributor

Re: message when loggin in root

i placed a set -x in the .profile...

The message appears before the lines in the .profile are called.
derekh
Rick Garland
Honored Contributor

Re: message when loggin in root

What does the .profile call? Does it source another file?
There is a default super-user profile at /usr/newconfig/.profile. Make a backup copy of the .profile in place now and copy the /usr/newconfig/.profile into place and run a login test. Does the awk error still show up?
f. halili
Trusted Contributor

Re: message when loggin in root

I clicked the 10 points to soon.

Topic is not yet closed.

I copied the /usr/newconfig/.profile to the root directory and same message still appears.....
derekh
Rick Garland
Honored Contributor

Re: message when loggin in root

The /usr/newconfig/.profile should only be calling/setting PATH, VUE, TERM, EDITOR, and MAIL. Is there anything else that is being called or set?

You may want to start commenting out some of the calls/sets to isolate the issue.

I don't think we have eliminated the /etc/profile yet either. Could be making a call for only the root account.
Denver Osborn
Honored Contributor

Re: message when loggin in root

Is the kernel parm "large_ncargs_enable = 0" if so try setting it to "large_ncargs_enable = 1"
Rick Garland
Honored Contributor

Re: message when loggin in root

What seems strange is that is appears when you login as root but not when you su - root. Check the /etc/profile again and see if it is suppose to do something only if root logs in (if "id" = "0").
Alan Riggs
Honored Contributor

Re: message when loggin in root

check /etc/profile. This is accessed before the individual user profiles at login but is not resourced with su - .
Antoanetta Naghiu
Esteemed Contributor

Re: message when loggin in root

Just as an idea? did you check the root entry in /etc/passwd and /etc/group? Login command is checking those file before executing profiles scripts. I don?t think you have got the /etc/gettydefs modified.
You are not getting the error when su, or login as another user then root. What about when you telnet or rlogin from another box? Do you have or not the same error?