1

Possible Duplicate:
Is it possible to run a command on windows server from Linux?

I have a stupid task (really stupid) - can i create windows user from linux machine. We have next: Linux with Samba (which mount windows partition with permission rwx) and Windows 2008 server (mounting some linux folder as net disk).

Im dont see somethings before and therefore it is asking. Can someone help?

Valintinr
  • 19
  • 2
  • Im already solved this task. Maybe someone will be interest how to do it: 1) install cygwin on windows and enable sshd there; 2)from ssh create user (net user /add) – Valintinr Jun 27 '12 at 12:08

1 Answers1

2

If your Samba install is in the same AD domain as the Server 2008 user, you can get around having to install cygwin. The command to do this is:

net ads user add username password

This will create a new AD user which then can be assigned access on the 2008 server.

sysadmin1138
  • 133,124
  • 18
  • 176
  • 300
  • I ran into a problem with this method: the account seems to be initially disabled. I tried using ldapmodify to fix it (by setting userAccountControl: 512), but ldapmodify can't find the user. I also couldn't find it with ldapsearch on cn=Users,dc=mydomain1,dc=mydomain2'. Can net be used to enable the account? – Chris Oct 11 '18 at 20:20
  • I solved it. The docs I had found showed a different ldap path to the user than what `net` put it in. Once I changed from "cn=Users,dc=mydomain1,dc=mydomain2" to "ou=Users,ou=mydomain1,dc=mydomain1,dc=mydomain2", it worked. I'm not sure *why* `net` did that, but now it's working for me. – Chris Oct 11 '18 at 20:40