Operating System - HP-UX
1834533 Members
3044 Online
110069 Solutions
New Discussion

Creating an anonymous user

 
Daivd Gwin
Occasional Contributor

Creating an anonymous user

My system was setup without an anonymous user and I have a PC software package that requires an anonymous user (with an uid of -2).

How do I create an anonymous user?
Knowledge of everything expert at nothing
4 REPLIES 4
Antoanetta Naghiu
Esteemed Contributor

Re: Creating an anonymous user

In Unix site?
See: http://www.docs.hp.com/dynaweb/hpux11/@Generic__CollectionView
It has a detailed desctiption about it.
Kofi ARTHIABAH
Honored Contributor

Re: Creating an anonymous user

you should have a user called nobody (in your /etc/passwd file) if you do not have one and you want to create one, edit the passwd file and add the following line:

nobody:*:-2:60001::/:

actually if you are root, you should be able to do:

echo "nobody:*:-2:60001::/:" >> /etc/passwd to append it to the passwd file.
nothing wrong with me that a few lines of code cannot fix!
Trevor Dyson
Trusted Contributor

Re: Creating an anonymous user

Ooooooh...

Be careful doing that cat. One missing ">" and you will have no password file.

Always back up your password file before making any editing changes to it. I would also prefer to use vipw than vi as this locks /etc/passwd while you are editing it.

The default entries for "nobody" in /etc/passwd and /etc/group at HP-UX 11.X are:

/etc/passwd:
nobody:*:-2:-2::/:

/etc/group:
nogroup:*:-2:

I believe this is the same for HP-UX 10.x

Regards, Trevor
I've got a little black book with me poems in
Bill Hassell
Honored Contributor

Re: Creating an anonymous user

I would second the caution about using echo and appending to the passwd file. I would recommend the use of vipw to edit the password file. It adds two benefits:

- It is easier to type than vi /etc/passwd and a lot easier to type than echo ... >> /etc/passwd

- It locks the passwd file in case some other root user is making changes at the same time.

In all cases, run pwck after making the changes to make sure the passwd file is intact.

If what you actually want is an anonymous ftp account, SAM will do a good job. Go to Networking and Communications -> Network Services -> Anonymous FTP


Bill Hassell, sysadmin