AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  useradd in smit - leading zero

    Posted Fri November 14, 2008 12:48 PM

    Originally posted by: SystemAdmin


    I have a problem when I add users, the ID should be 0123456 however when the user gets created, the ID is 123456 in /etc/passwd

    Is there a way to have smit not strip the leading '0'?

    Thanks
    #AIX-Forum


  • 2.  Re: useradd in smit - leading zero

    Posted Fri November 14, 2008 12:53 PM

    Originally posted by: SystemAdmin


    This behavior happens with mkuser as well:

    mkuser id='0123456' test
    tail /etc/passwd

    test:*:123456:201:/home/test/
    #AIX-Forum


  • 3.  Re: useradd in smit - leading zero

    Posted Fri November 14, 2008 02:11 PM

    Originally posted by: j.gann


    id is an integer, the leading zero is not necessary and therefore removed.
    #AIX-Forum


  • 4.  Re: useradd in smit - leading zero

    Posted Fri November 14, 2008 02:13 PM

    Originally posted by: SystemAdmin


    in our environment, we use it, and must add it back in /etc/passwd every time we create a user. Is there any way you can think of to keep it from happening?
    #AIX-Forum


  • 5.  Re: useradd in smit - leading zero

    Posted Fri November 14, 2008 02:24 PM

    Originally posted by: j.gann


    whatever you try to accomplish, find a different solution. /etc/passwd is not to be edited directly. period.
    the gecos entry is a string used for user information, you can alter this. but use the chuser or mkuser commands.
    #AIX-Forum


  • 6.  Re: useradd in smit - leading zero

    Posted Fri November 14, 2008 02:39 PM

    Originally posted by: SystemAdmin


    I appreciate your concern, however it has been done this way for years with no ill effects. We are just trying to save the time of manually editing the file by fixing the problem.

    Thanks

    Mike
    #AIX-Forum