Operating System - HP-UX
1838381 Members
2691 Online
110125 Solutions
New Discussion

Re: cleanup returns You must be superuser to run this command.

 
Alvin Crofts_1
Occasional Advisor

cleanup returns You must be superuser to run this command.

Hi All,

Have very little room left in /var and when I run cleanup (as root on local machine) get the following error. swmodify returns pretty much the same message


=================

Committing patches superseded at least 5 time(s) ...
ERROR: swmodify(1M) encountered problems committing the
superseded patches:

ERROR: You must be superuser to run this command.
All information has been logged to /var/adm/cleanup.log.
### Cleanup program completed at 01/05/06 09:40:54
12 REPLIES 12
Rick Garland
Honored Contributor

Re: cleanup returns You must be superuser to run this command.

Are you running this as root? Does the UID=0?

What is the return from the 'id' command?
Pete Randall
Outstanding Contributor

Re: cleanup returns You must be superuser to run this command.

Alvin,

Any of the SD update commands, including cleanup and swmodify, require that they be run as root.


Pete

Pete
Alvin Crofts_1
Occasional Advisor

Re: cleanup returns You must be superuser to run this command.

I am running it as root.
Alvin Crofts_1
Occasional Advisor

Re: cleanup returns You must be superuser to run this command.

I am running it as root. # id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users),104(netx)
James R. Ferguson
Acclaimed Contributor

Re: cleanup returns You must be superuser to run this command.

Hi Alvin:

Try restarting the 'swagentd' daemon:

# /usr/sbin/swagentd -r

Regards!

...JRF...
MarkSyder
Honored Contributor

Re: cleanup returns You must be superuser to run this command.

Have you read the /var/adm/cleanup.log in case it gives more detail?

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Rick Garland
Honored Contributor

Re: cleanup returns You must be superuser to run this command.

Couple of log files to look at.
/var/adm/cleanup.log & /tmp/cleanup.$$

The /usr/sbin/cleanup file can be viewed. There is a section cheking the 'whoami' return. If you issue the 'whoami' command what is return?


Alvin Crofts_1
Occasional Advisor

Re: cleanup returns You must be superuser to run this command.

Whoami returns root as does id. In this example I selected 5 as there is only one that is at 5. The cleanup.log has the following:



### Cleanup program started at 01/05/06 09:49:29
Commit patches superseded at least 5 time(s) on 'hpk220'.
Obtaining superseded patch information...done.

The following patches superseded at least 5 time(s) can be committed:

Superseded # Times Superseded Disk Space in /var/adm/sw/save Superseded By
========== ================== ============================== =============
PHKL_23609 5 110592 bytes PHKL_25166

WARNING: When a patch is committed, the files saved to /var/adm/sw/save
during the installation of the patch are removed. If
these saved files are not present, then the patch cannot
be removed from the system via swremove(1M).

If these files in /var/adm/sw/save must be removed, HP
recommends that the /var/adm/sw/save directory first be
backed up. If it should become necessary to remove the
patch in the future, the files must be recovered from the
backup prior to removing the patch.

If you have not already created a backup of /var/adm/sw/save,
you may wish to do so before proceeding with the patch
commit operation.

Would you still like to commit these patches? y
Committing patches superseded at least 5 time(s) ...
ERROR: swmodify(1M) encountered problems committing the
superseded patches:

ERROR: You must be superuser to run this command.
All information has been logged to /var/adm/cleanup.log.
### Cleanup program completed at 01/05/06 09:49:29
Howard Marshall
Regular Advisor

Re: cleanup returns You must be superuser to run this command.

I don't know if this will have anything to do with it or not but double check your network id. Do an nslookup on the hostname and make sure its correct and then do a reverse lookup nslookup by the ip address and make sure it uses the same service for both.

I have found that the sw commands tend to report that they have problems that are actually unrelated to the real problem.

You may also want to double check the ownership and permissions on the password file, and the sw directories. As if thatâ s not enough, you may try removing or reducing some large log files from /var/adm. There may not be enough free space on var to create a list file or something and its translating that as a permissions issue.

Beyond that, you may try manually committing that patch with the gui swmodify to see if gives you a different error.
Alvin Crofts_1
Occasional Advisor

Re: cleanup returns You must be superuser to run this command.

Thanks for the recommendations. I compared the sw* files in the /usr/sbin on the 11i machine that I am having problems with compared with the /usr/sbin/sw* files on a 11.0 machine that I have and the dates on the problem machine are a year older than the ones running on the 11.0 machine so I have downloaded the latest patch set (again) and will select anything that appears to be a sw* program and do a force overwrite. I am able to swconfig the file but swmodify falls flat on its face again complaining about permissions.
Robert-Jan Goossens
Honored Contributor

Re: cleanup returns You must be superuser to run this command.

Hi,

Just a thought, could you check the permisions of your executables in the /usr/sbin directory ?

# ll /usr/sbin/cleanup
etc
Robert-Jan
Alvin Crofts_1
Occasional Advisor

Re: cleanup returns You must be superuser to run this command.

After copying the newer versions of the sw* files to the /usr/sbin directory the cleanup ran as advertised. How I ended up with old /usr/sbin/sw* files who knows. Thanks so much for all of the recomendations