# Changing user accounts via Unix commands



## macismyworld (Aug 25, 2006)

I was wondering if anyone knows the Unix command to change a standard Mac OS X.4.3 account to an administrator account. I have several workstations in a remote location that needs another local administrator account added to the computers. I can connect to the computers via Apple Remote Desktop and can create an account using the Change Client Settings option. However, ARD will only create a standard user account and not an administrator account. I'm not  fluent in Unix, but I figure there must be a way to change user account privileges from standard to administrator with a Unix command(s). If need be, I could connect to each computer and change the account, but because of the sheer number of workstations that will take a considerable amount of time. If anyone knows a way to change user accounts permissions via Unix, I would greatly appreciate it.

Thanks


----------



## michaelsanford (Sep 15, 2006)

su <username>
sudo <command>

aka Switch User and SuperUser DO


----------



## cfr (Oct 11, 2006)

Have you looked through the manpages for managing netinfo data?

$ apropos netinfo
will give you a reasonable list to start with. You might want to begin my looking at niutil:
$ man niutil

How to do it - and how best to do it - depends slightly on your system setup. If the machines are using netinfo (except in single user mode), then you can either manipulate the netinfo data directly using the ni- commands or you can dump the relevant files to an editable format and then reload then after editing.

It is obviously a good idea to backup the netinfo database first.

Basically, you need to manipulate the groups to which the user belongs, I think. I've not done this myself, though, so this might not be sufficient on its own. (Or, rather, I've not done exactly this myself and don't use the ni- commands terribly often.)

- cfr


----------

