Operating System - HP-UX
1826058 Members
4357 Online
109690 Solutions
New Discussion

Regarding Cron and swlist

 
SOLVED
Go to solution
vind123
Regular Advisor

Regarding Cron and swlist

1. I had created two new user in my HP-UNIX 11.0 system. I did a crontab -l in these users but it gave permissions problem. So i added the new users to /usr/lib/crontab.allow . When i do a crontab -l i am getting "can't open your crontab file" . How do i set crontab for the new users.

2. How do i a start/stop the cron daemon. Is there any commands to do it?

3. When i do a swlist alone i am getting some output. From which directory it takes and list me the output. To which directory the depot is mapped in HP-UX systems. How do i find it?
swlist
6 REPLIES 6
Steven E. Protter
Exalted Contributor
Solution

Re: Regarding Cron and swlist

Shalom,

1. You have done so.

2.
/sbin/init.d/cron stop (or crond)
/sbin/init.d/cron start (or crond)

No system handy right now.

3. swlist reads a database of installed depot or sd-ux comptabile programs installed on the system. It is kept in /var/sw

swlist is designed to read this database. I'm not sure if its actually human readable as I've never tried to read it by hand.

swlist -l product | grep -i name pattern
# usually helps you find installed software.

Remember that not all software on an HP-UX system needs to be installed by sd-ux, therefore the list is almost never complete in the real world.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Patrick Wallek
Honored Contributor

Re: Regarding Cron and swlist

1. As those users do a 'crontab -e' to edit the crontab file and set up cron jobs.

If you are root you can do 'crontab -e username' to edit usernames crontab file or 'crontab -l username' to list it.

James R. Ferguson
Acclaimed Contributor

Re: Regarding Cron and swlist

Hi:

As for 'swlist', by default is reads the '/var/adm/sw' directory to ascertain the contents of your Installed Product Database (IPD).

Most certainly, the files within '/var/adm/sw' are "human readable". This, afterall, is part of the UNIX philosophy. You should not attempt to manually edit the contents, however, but rather rely only on the standard SD tools ("swinstall', 'swremove', 'swverify', 'cleanup', etc.).

If you should loose part or all of the IPD you will have a server that is simply not patch-able!

If you want to list the contents of a depot as opposed to the IPD, use the '-d ' argument to 'swlist'.

Regards!

...JRF...

Re: Regarding Cron and swlist

Friend,

You can start and stop the cron daemons

1> Login to root user
2) /sbin/init.d/cron stop
3) /sbin/init.d/cron start

The default software directory is /var/adm/sw. Usually swlist reads from default directory only. By using SAM also you can find the default software depot.

- Vivek
vind123
Regular Advisor

Re: Regarding Cron and swlist

Thanks a lot for the info.
vind123
Regular Advisor

Re: Regarding Cron and swlist

thx a lot.