Skip to content

adding a new user to 0xdata machines

Kevin Normoyle edited this page Sep 12, 2013 · 25 revisions

There may be better way to handle this, but this is what I currently do.

Need to do on all machines (I use clusterssh to do this. Currently I use /home/kevin/clo to get all ubuntu machines. 192.168.1.150 and 192.168.1.151 are old centos machines. So I'm not creating new users there. I think use of them is deprecated. Means we don't have to worry about doing centos stuff and ubuntu stuff together in a tabbed ssh.

clusterssh -o "-X" -l root 192.168.1.161 192.168.1.162 192.168.1.163 192.168.1.164 192.168.1.171 192.168.1.172 192.168.1.173 192.168.1.174 192.168.1.175 192.168.1.176 192.168.1.177 192.168.1.178 192.168.1.179 192.168.1.180

Mapr requires username to have the same uid and gid on all systems, if you dispatch h2o on mapr.

I handle this manually right now. Went through a step of fixing old random uid/gid to be in sync for users on machines, so hopefully we don't let things get out of sync again (since any files created need to be adjusted if uid/gid changes)

On every machine there is some stuff I used to interrogate

cd /root/check_uid
./gather_gid1.sh
./gather_uid1.sh

If you grep the resulting files, groupreport.txt and userreport.txt, you can find the existing uids/gids in use.

I started all the new user uid/gids at 2100

The last user I added is shown below (both uid and gid should be the same)

If you grep 211 *txt, you the uids and gids on all current, and pick the next biggest incremental number in the 21xx series

To add a user (need to do this as root)

Note the group needs to be created first The list of secondary groups is what may be useful at 0xdata (we have 3 hdfs clusters with some special users and groups. Security within their hdfs filesystems is a whole 'nuther discussion!

addgroup --gid 2117 jenkins
adduser --uid 2117 -gid 2117 jenkins
Clone this wiki locally