Operating System - HP-UX
1822895 Members
3709 Online
109645 Solutions
New Discussion юеВ

what' wrong with my system!

 
leyearn
Regular Advisor

what' wrong with my system!

# su - nvlocal
/etc/profile[83]: /usr/bin/stty: arg list too long
/etc/profile[92]: /usr/bin/cat: arg list too long
/etc/profile[105]: /usr/bin/mail: arg list too long
/etc/profile[113]: /usr/bin/news: arg list too long
$ ls
ksh: /usr/bin/ls: arg list too long
22 REPLIES 22
Jeff Schussele
Honored Contributor

Re: what' wrong with my system!

Hi,

I'd say you have a serious problem in your /etc/profile file.
It has to contain some serious junk.
I believe there's a "clean" profile file in /usr/newconfig/etc. Check it out & get it copied into place - IF you can get logged in.
Else you'll have to go into single-user mode.

Good Luck,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
leyearn
Regular Advisor

Re: what' wrong with my system!

but on node1
#su - nvlocal
is ok
but on node2
# su - nvlocal
/etc/profile[83]: /usr/bin/stty: arg list too long
/etc/profile[92]: /usr/bin/cat: arg list too long
/etc/profile[105]: /usr/bin/mail: arg list too long
/etc/profile[113]: /usr/bin/news: arg list too long
${HOME:-.}/.profile[11]: /usr/bin/tset: arg list too long
${HOME:-.}/.profile[13]: /usr/bin/stty: arg list too long
${HOME:-.}/.profile[14]: /usr/bin/stty: arg list too long
${HOME:-.}/.profile[15]: /usr/bin/tabs: arg list too long

so i no node1
#rcp -p /etc/profile node2:/etc/
but it doesn't work well
the problem doesn't be resolved!


Navin Bhat_2
Trusted Contributor

Re: what' wrong with my system!

Arg list too long

You specified too many arguments for the command, or you may have
inserted an unwanted space character. Examine your command line and the
syntax for the command. Make necessary adjustments and try again. Go to individual lines and move the cursor to see where it ends.
Dani Seely
Valued Contributor

Re: what' wrong with my system!

From what you've described and the symbols you've used to show your command line prompts, this isn't your root account that is having the problem. That's a good thing!

You may have an escape sequence or some special characters in the profile. You can try to resolve this by using 'strings /etc/profile |more' to see any special characters or weird looking strings. It appears that your profile is pretty big ... at least 113 lines. That's pretty big, so I'm betting you have some funky characters or strings in there.

To work around this rather than try to trouble shoot, save this profile and restore it from a backup (you can restore just the /etc/profile from an Ignite backup if that's the only backup you have) or you can copy one from a similar system.

Hope this helps!
Together We Stand!
leyearn
Regular Advisor

Re: what' wrong with my system!

but the node1 doesn't have the problem
so on node1
#rcp -p /etc/profile node2:/etc/
but
#su - nvlocal
doesn't work well
Geoff Wild
Honored Contributor

Re: what' wrong with my system!

Sounds like you need to really audit your nodes - make sure they are the same.

Something to help you audit is ccmon:

http://h71028.www7.hp.com/enterprise/downloads/ccmon-service-brief.pdf

Talk to your HP Support Rep - it will cost you a couple of Technical Service days...

If you can't do that - then you need to check things by hand, look at patch levels, installed software, configuration files in /etc like services, inetd.conf, etc...kernel parameters, just to name a few....

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Kiyoshi Miyake
Frequent Advisor

Re: what' wrong with my system!

Hi,

There is the "ttytype" command before stty (in /etc/profile[113]).
So, maybe, there is some difference "TERM" between node1 and node2.
Please try the command "echo $TERM" and "ttytype -s -a"
no node1 and node2.
Check difference.

Thanks.
KapilRaj
Honored Contributor

Re: what' wrong with my system!

I have a hint here You /etc/profile can have a line similier to the following ...

. /apps1/scripts/menu.inc # which is only there on the problem node. not on the other ... and that script is the one who creates this problems.

Also is there a file equivalent to /etc/environment in HPUX ?

Regds,

Kaps

Nothing is impossible
pap
Respected Contributor

Re: what' wrong with my system!

Hi ,
It will be good if you can post your /etc/profile file, your .profile and your /etc/environment file.
Thanks,
-pap
"Winners don't do different things , they do things differently"
R. Allan Hicks
Trusted Contributor

Re: what' wrong with my system!

I take it that node1:/etc/profile is the same as node2:/etc/profile?

The number is the line number of the script that the shell has issue with.

What is on lines 83,92,105 and 113. In particular look at 83 and be aware that the problem could be somewere in lines 1 - 82 as well.

If the profiles are identical, check the environment. Not haveing an environment variable on the other node could cause a cascading failure
"Only he who attempts the absurd is capable of achieving the impossible

Re: what' wrong with my system!

The fact that you get the *same* problem after the su completes and you type 'ls' suggests that the problem isn't with /etc/profile, but rather with the shell... Do you get the same problem if you do:

su nvlocal -c "/usr/bin/ksh"
ls

What is specified for the shell in the /etc/passwd file - no corruptions there?

Is /usr/bin/ksh the same on both systems (size/cksum)

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Kent Ostby
Honored Contributor

Re: what' wrong with my system!

What about nvlocal's .profile.

You're focused on /etc/profile which is system wide, but the problem is with a particular user.

I would make a back up copy of this user's profile and then copy another users here and see what happens.

Another thought is that you could post .profile for the nvlocal's user and we could take a look at it.

usually when I have trouble with .profile's its because I left out a quote or something.
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Mike Stroyan
Honored Contributor

Re: what' wrong with my system!

I expect that you have a really really large environment variable. The exec command has a limit on the total size of the arguments and evironment variables. Your environment variables must be too large even when you pass no arguments at all.

The limit is 20478 characters on an unpatched 10.20 system and 2048000 characters on an 11.x system. You can check the limit with "getconf ARG_MAX". If you have 10.20 you can increase the limit by installing patch PHKL_16751 and setting the kernel parameter "large_ncargs_enabled=1".
Fred Ruffet
Honored Contributor

Re: what' wrong with my system!

Duncan seems right to me : This doesn't seem to be a profile problem. Could you tell what shell is affected to nvlocal ?
send output for
grep nvlocal /etc/passwd
As long as shell is the last arg on the line, see if there are no trailing space or non-printable characters.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
leyearn
Regular Advisor

Re: what' wrong with my system!


I created a user named hp with default settings
when i
#su - hp
the same phenomenon appeared
# su - hp
/etc/profile[83]: /usr/bin/stty: arg list too long
/etc/profile[92]: /usr/bin/cat: arg list too long
/etc/profile[105]: /usr/bin/mail: arg list too long
/etc/profile[113]: /usr/bin/news: arg list too long
${HOME:-.}/.profile[11]: /usr/bin/tset: arg list too long
${HOME:-.}/.profile[13]: /usr/bin/stty: arg list too long
${HOME:-.}/.profile[14]: /usr/bin/stty: arg list too long
${HOME:-.}/.profile[15]: /usr/bin/tabs: arg list too long


I think it seems have something wrong with the system itself
is there need patch it?
leyearn
Regular Advisor

Re: what' wrong with my system!

the shell for nvlocal and hp is /usr/bin/ksh
I also found that if the shell was /usr/bin/sh ,su - nvlocal command ok
Dani Seely
Valued Contributor

Re: what' wrong with my system!

Do an ls -l of your shells (/usr/bin/ksh and /usr/bin/sh) and post the results so we can see the file permissions, ownership, and size. Could be that you have an infected shell.
Together We Stand!
leyearn
Regular Advisor

Re: what' wrong with my system!

-r-xr-xr-x 1 bin bin 24576 Nov 14 2000 autopush
-r-sr-xr-x 5 root bin 45056 Nov 14 2000 chsh
-r-xr-xr-x 1 bin bin 151552 Nov 14 2000 csh
-r-xr-xr-x 1 bin bin 152 Nov 14 2000 hash
-r-xr-xr-x 1 bin bin 245760 Nov 14 2000 keysh
-r-xr-xr-x 2 bin bin 151552 Nov 14 2000 ksh
-r-sr-xr-x 1 root bin 28672 Nov 14 2000 remsh
-r-xr-xr-x 2 bin bin 151552 Nov 14 2000 rksh
-r-xr-xr-x 2 bin bin 204800 Nov 14 2000 rsh
-r-xr-xr-x 2 bin bin 204800 Nov 14 2000 sh
Dani Seely
Valued Contributor

Re: what' wrong with my system!

Hello,
I assume this is your first experience on the ITRC forum as you did not award points to the forumers for the answers you were provided. May I suggest that you take a look at the following link to learn about the points system in use here. Thanks.

http://forums1.itrc.hp.com/service/forums/helptips.do?#28

Please read the article, assess the assistance you were provided by the forumers, then reward them. Thanks!
Together We Stand!
Fred Ruffet
Honored Contributor

Re: what' wrong with my system!

if it works with sh, not with ksh, it might be a problem with the .kshrc file. Could you post a copy of it ? Could you also post a copy of the file pointed by the $ENV variable ?

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
V. Nyga
Honored Contributor

Re: what' wrong with my system!

Hi,

- problem only at node 2 - is the Home-directory nfs-mounted?
Can you do a ls -l in the home-dir?

Volkmar
*** Say 'Thanks' with Kudos ***
Dave Hutton
Honored Contributor

Re: what' wrong with my system!

I found this:
Arg list too long

You specified too many arguments for the command, or you may have
inserted an unwanted space character. Examine your command line and the
syntax for the command. Make necessary adjustments and try again.


May want to verify even if your profile looks correctly. There maybe an extra space in there some where.

The only other time I've seen this is where you have a slew of files in a directory and you try to do a command like rm *.txt and theres thousands of files. I'm assuming this persons home directory is pretty much empty except for the standard env files.

Dave