Friday, December 13, 2013

doubt about UID GID no

www.unixbabuforum.inHow to set up a UID GID number that are automatically creates with particular sequence while we add a user? 
For example I need to create a user which have a uid above 5000 which should not the same, and should not conflict with each other ( to stop exploit other users files, dirs) users UID GID 
Is it possible by automatic?

www.unixbabuforum.inthe trick you want is not possible, but there is one way to accomplish something similar. I will demonstrate by create 3 users with different UID, first and second with ID set manually and last automatic and you will see the result 
# useradd -u 200 test1 
# tail -1 /etc/passwd 
test1:x:200:1::/home/test1:/bin/sh 
# useradd -u 500 test2 
# tail -2 /etc/passwd 
test1:x:200:1::/home/test1:/bin/sh 
test2:x:500:1::/home/test2:/bin/sh 
# useradd test3 
# tail -3 /etc/passwd 
test1:x:200:1::/home/test1:/bin/sh 
test2:x:500:1::/home/test2:/bin/sh 
test3:x:501:1::/home/test3:/bin/sh 


www.unixbabuforum.inThere is no such file by default (/var/sadm/defadduser). There is one in /usr/sadm directory And according to the descriptions UID is not part of the parameters, described in this file 


0 comments:

Post a Comment

 
Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM