From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,b60152dfa07cef4c,start X-Google-Attributes: gid1164f8,public From: madmax@fly.srk.fer.hr (Kresimir Kukulj) Subject: Digital UNIX - deleting retired accounts, how ? Date: 2000/04/20 Message-ID: #1/1 X-Deja-AN: 613456614 X-Complaints-To: abuse@news.carnet.hr X-Trace: bagan.srce.hr 956209035 23549 161.53.70.130 (20 Apr 2000 05:37:15 GMT) Organization: Faculty of Electrical Engineering & Computing, Zagreb, Croatia User-Agent: slrn/0.9.5.4 (UNIX) NNTP-Posting-Date: 20 Apr 2000 05:37:15 GMT Newsgroups: comp.sys.dec On DU 4.0D (with C2 security stuff) if I add a user: >useradd test >/usr/tcb/bin/edauth -g test test:u_name=test:u_id#207:chkent: >userdel test >/usr/tcb/bin/edauth -g test test:u_name=test:u_id#207:u_retired:chkent: >grep test /etc/passwd test:Retired*:207:15::/home/test:/usr/local/bin/bash And: >useradd test useradd: User already exists How do I remove that user "for real" ? I have read FAQ and relevent documentation on www.unix.digital.com and found that sysman, dxaccount & co use userdel to do the removal. I have found a workaround as follows: >/usr/tcb/bin/edauth -r test >/usr/tcb/bin/edauth -g test Couldn't find entry named "test" And do something like: egrep -v '^test:' /etc/passwd > /etc/passwd.new; mv this that... [ I could live with edauth -r, but handling passwd file in this manner, without locking, is a terrible hack.] Is there a proper way ? I need a command line utility for a script. I need to re-add a user (by removing it, then adding it). I have tackled with this for a very long time trying to find something in documentation. I have found nothing. I have a feeling I have missed something, and I will probably feel very stupid when someone (hopefully) enlightens me, so fire away ;-) I have administered Linux and Solaris, but Digital UNIX is very unfamiliar to me. Please help. Regards. -- Kresimir Kukulj madmax@fly.srk.fer.hr +----------------------------------------------------+ "Vee haf vay of making you use Vindows!" - Adolf Gates