Unix Technical Forum

mkuser Question

This is a discussion on mkuser Question within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hello everyone! I'm working on a script that uses mkuser to add user ID's in batch on an AIX ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-04-2008, 09:41 PM
Test
 
Posts: n/a
Default mkuser Question

Hello everyone!

I'm working on a script that uses mkuser to add user ID's in batch on
an AIX 5.1 system, and I need to have all of the user accounts' UID's
start at 200 (don't ask me, ask management).

I know you can specify the UID in the mkuser command, but I would
rather let AIX assign them so if ID's get deleted, the UID can be
reused. Is there a way to do this in a script? Would it involve
modifying the /etc/security/.ids file somehow?

Thanks in advance!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-04-2008, 09:41 PM
Mike
 
Posts: n/a
Default Re: mkuser Question

In article <ea473f2f.0402180817.77e8e915@posting.google.com >, Test wrote:
> Hello everyone!
>
> I'm working on a script that uses mkuser to add user ID's in batch on
> an AIX 5.1 system, and I need to have all of the user accounts' UID's
> start at 200 (don't ask me, ask management).
>
> I know you can specify the UID in the mkuser command, but I would
> rather let AIX assign them so if ID's get deleted, the UID can be
> reused. Is there a way to do this in a script? Would it involve
> modifying the /etc/security/.ids file somehow?
>
> Thanks in advance!


What about creating a dummy account at 199, running your script,
then removing the dummy account?

Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-04-2008, 09:41 PM
camp hawk
 
Posts: n/a
Default Re: mkuser Question

The UIDs less than 500 are privilleged users. It is not good idea to
assign large amount of users' ID < 500.

The command phrase will create a account with specified ID.
mkuser id=$id $name

Create a plain text file that a username per line. Then ...

read $name
id=`expr $id + 1` # Be ware of spaces.
mkuser id=$id $name

I don't know how the AIX does, but Linux would not use the IDs < 500
by default.

Good Luck

Camp

cademair@yahoo.com (Test) wrote in message news:<ea473f2f.0402180817.77e8e915@posting.google. com>...
> Hello everyone!
>
> I'm working on a script that uses mkuser to add user ID's in batch on
> an AIX 5.1 system, and I need to have all of the user accounts' UID's
> start at 200 (don't ask me, ask management).
>
> I know you can specify the UID in the mkuser command, but I would
> rather let AIX assign them so if ID's get deleted, the UID can be
> reused. Is there a way to do this in a script? Would it involve
> modifying the /etc/security/.ids file somehow?
>
> Thanks in advance!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:30 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com