Discussion:
[Samba] Net rpc user add and the "-F" flag.
(too old to reply)
Nicolas Costes
2004-07-07 15:30:12 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hello, all !

I'm trying to add users to my NT domain from my samba servers (This to
create all my accounts with only a single script, I do not want to create
them on the PDC, then create their folders on the samba file server with
another...)

I managed to create account with "net rpc user add", then put them in the
right domain group with "net groupmember", but what about the other
parameters (User Z drive, profile path, etc...) ?

And I tried to give the users a password with the "net rpc user add <user>
<password>", but it doaesn't work !

I think the "-F" flag would help, but it's documented nowhere !
Here is the only mail I found related to my problem (Thanks to Google), but
it never had any answer...

Can you help ?
Joe Mondloch
Tue Sep 9 20:41:22 GMT 2003
I'm not sure if this functionality fully exists yet or not...
I would like to be able to create user accounts on a Windows 2000
machine from my Linux host via Samba. I also need to be able to assign
these user accounts to particular groups.
net rpc user ADD foo -S W2K_SERVER -U Administrator
This seems to create the user, but the account is disabled and is not a
member of any groups. The 'net rpc user' command takes a number of other
options according to the help, such as '-F user flags'. Unfortunately, I
have not been able to find any documentation about what those flags are.
Thanks for any help,
Joe
- --
,,
(°> Nicolas Costes
/|\ IUT de La Roche / Yon
( ^ ) Clé publique: http://www.keyserver.net/
^ ^ http://www.gnu.org/philosophy/can-you-trust.fr.html


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA7BVqNc2aXy7LuOgRAhbKAJ9egqR0sPxfI4zIBa2Xdd4RzI99QwCfdVod
nvSUMzmjueG3Wud8Fqjy2tU=
=sven
-----END PGP SIGNATURE-----
--
To unsubscribe from this list go to the following URL and read the
instructions: http://lists.samba.org/mailman/listinfo/samba
Nicolas Costes
2004-07-08 14:20:06 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hello again...
Really no one knows about this "-F" flag in "net user add" ?
Post by Nicolas Costes
Hello, all !
I'm trying to add users to my NT domain from my samba servers (This to
create all my accounts with only a single script, I do not want to create
them on the PDC, then create their folders on the samba file server with
another...)
I managed to create account with "net rpc user add", then put them in the
right domain group with "net groupmember", but what about the other
parameters (User Z drive, profile path, etc...) ?
And I tried to give the users a password with the "net rpc user add
<user> <password>", but it doaesn't work !
I think the "-F" flag would help, but it's documented nowhere !
Here is the only mail I found related to my problem (Thanks to Google),
but it never had any answer...
Can you help ?
Joe Mondloch
Tue Sep 9 20:41:22 GMT 2003
I'm not sure if this functionality fully exists yet or not...
I would like to be able to create user accounts on a Windows 2000
machine from my Linux host via Samba. I also need to be able to assign
these user accounts to particular groups.
net rpc user ADD foo -S W2K_SERVER -U Administrator
This seems to create the user, but the account is disabled and is not a
member of any groups. The 'net rpc user' command takes a number of
other options according to the help, such as '-F user flags'.
Unfortunately, I have not been able to find any documentation about
what those flags are.
Thanks for any help,
Joe
--
,,
(°> Nicolas Costes
/|\ IUT de La Roche / Yon
( ^ ) Clé publique: http://www.keyserver.net/
^ ^ http://www.gnu.org/philosophy/can-you-trust.fr.html
- --
,,
(°> Nicolas Costes
/|\ IUT de La Roche / Yon
( ^ ) Clé publique: http://www.keyserver.net/
^ ^ http://www.gnu.org/philosophy/can-you-trust.fr.html


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA7VXeNc2aXy7LuOgRAuE1AKCE9AmF1ziyG5KXKv0UY1SyFE7nTACgqzzE
obibHn0U6I0RqGBs5tcBAeo=
=nRQY
-----END PGP SIGNATURE-----
--
To unsubscribe from this list go to the following URL and read the
instructions: http://lists.samba.org/mailman/listinfo/samba
Paul Gienger
2004-07-08 14:30:09 UTC
Permalink
Post by Nicolas Costes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello again...
Really no one knows about this "-F" flag in "net user add" ?
From the man page on the net command

[RPC|ADS] USER ADD name [password] [-F user flags] [-C comment]

The -F then would seem to set the flags. THIS part is not documented
very intuitively, but is available, in the man page for pdbedit

<liberal use of snip>
Possible flags are listed below.

*

N: No password required

*

D: Account disabled

*

H: Home directory required

*

T: Temporary duplicate of other account

*

U: Regular user account

*

M: MNS logon user account

*

W: Workstation Trust Account

*

S: Server Trust Account

*

L: Automatic Locking

*

X: Password does not expire

*

I: Domain Trust Account

That's where the documentation leads me, although I'm open to alternate
interpretations
Post by Nicolas Costes
Post by Nicolas Costes
Hello, all !
I'm trying to add users to my NT domain from my samba servers (This to
create all my accounts with only a single script, I do not want to create
them on the PDC, then create their folders on the samba file server with
another...)
I managed to create account with "net rpc user add", then put them in the
right domain group with "net groupmember", but what about the other
parameters (User Z drive, profile path, etc...) ?
And I tried to give the users a password with the "net rpc user add
<user> <password>", but it doaesn't work !
I think the "-F" flag would help, but it's documented nowhere !
Here is the only mail I found related to my problem (Thanks to Google),
but it never had any answer...
Can you help ?
Joe Mondloch
Tue Sep 9 20:41:22 GMT 2003
I'm not sure if this functionality fully exists yet or not...
I would like to be able to create user accounts on a Windows 2000
machine from my Linux host via Samba. I also need to be able to assign
these user accounts to particular groups.
net rpc user ADD foo -S W2K_SERVER -U Administrator
This seems to create the user, but the account is disabled and is not a
member of any groups. The 'net rpc user' command takes a number of
other options according to the help, such as '-F user flags'.
Unfortunately, I have not been able to find any documentation about
what those flags are.
Thanks for any help,
Joe
--
,,
(°> Nicolas Costes
/|\ IUT de La Roche / Yon
( ^ ) Clé publique: http://www.keyserver.net/
^ ^ http://www.gnu.org/philosophy/can-you-trust.fr.html
- --
,,
(°> Nicolas Costes
/|\ IUT de La Roche / Yon
( ^ ) Clé publique: http://www.keyserver.net/
^ ^ http://www.gnu.org/philosophy/can-you-trust.fr.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFA7VXeNc2aXy7LuOgRAuE1AKCE9AmF1ziyG5KXKv0UY1SyFE7nTACgqzzE
obibHn0U6I0RqGBs5tcBAeo=
=nRQY
-----END PGP SIGNATURE-----
--
Paul Gienger Office: 701-281-1884
Applied Engineering Inc. Cell: 701-306-6254
Information Systems Consultant Fax: 701-281-1322
URL: www.ae-solutions.com mailto:***@ae-solutions.com
--
To unsubscribe from this list go to the following URL and read the
instructions: http://lists.samba.org/mailman/listinfo/samba
Nicolas Costes
2004-07-08 14:30:15 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le jeudi 8 Juillet 2004 16:21, Paul Gienger a écrit :
[...]
Post by Paul Gienger
From the man page on the net command
[RPC|ADS] USER ADD name [password] [-F user flags] [-C comment]
The -F then would seem to set the flags. THIS part is not documented
very intuitively, but is available, in the man page for pdbedit
It seems to answer my question, thanks :-)
I'll look at pbedit's man page right now !

,,
(°> Nicolas Costes
/|\ IUT de La Roche / Yon
( ^ ) Clé publique: http://www.keyserver.net/
^ ^ http://www.gnu.org/philosophy/can-you-trust.fr.html


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA7VkrNc2aXy7LuOgRApNQAJ9ayExiuDQUCD1lmBL9rvR8fK6/UQCdHVgy
YAjuNOUxKnBGUsL2mTiBf+E=
=umau
-----END PGP SIGNATURE-----
--
To unsubscribe from this list go to the following URL and read the
instructions: http://lists.samba.org/mailman/listinfo/samba
Nicolas Costes
2004-07-08 16:30:15 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Back from the pdbedit manual...
Post by Paul Gienger
From the man page on the net command
[RPC|ADS] USER ADD name [password] [-F user flags] [-C comment]
The -F then would seem to set the flags. THIS part is not documented
very intuitively, but is available, in the man page for pdbedit
Well, I got there, and I can't see any of the following lines... How did you
manage to guess that the information is in this man page ?
Post by Paul Gienger
<liberal use of snip>
It must be, because as I said, I can't find any of the following in that man
page. So, I tried to use some of these options into the "net user add"
command, after the "-F" flag, but it keeps returning me "usage()" :-(

Could you give me an example of what you think is the actual syntax to this
flag ? Say, for example, creating a user specifying is homedrive, homepath,
profilepath, etc... Some thing like :

# net rpc user add TestUser -F ????? -U administrator -S server
Post by Paul Gienger
Possible flags are listed below.
*
N: No password required
*
D: Account disabled
[...]
Post by Paul Gienger
That's where the documentation leads me, although I'm open to alternate
interpretations
I find it very sad that this particular set of otpions isn't documented a
little, even with --help... Maybe that deep because I need this
"-F" ;-P !!!

Isn't there any other way (Using any number of samba commands) to perform
remote account creation ? I *really* don't want to create my accounts
half-manually on the NT server then on the Samba file server... :-(

- --
,,
(°> Nicolas Costes
/|\ IUT de La Roche / Yon
( ^ ) Clé publique: http://www.keyserver.net/
^ ^ http://www.gnu.org/philosophy/can-you-trust.fr.html


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA7XW3Nc2aXy7LuOgRAtwtAJ0Q8jgZpDtWZVNBhgv0P2RR1v5BrQCdHsNz
NJ7MlOuY+uTnfb3T5/1HE0M=
=Efz6
-----END PGP SIGNATURE-----
--
To unsubscribe from this list go to the following URL and read the
instructions: http://lists.samba.org/mailman/listinfo/samba
Paul Gienger
2004-07-08 16:40:10 UTC
Permalink
Post by Nicolas Costes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Back from the pdbedit manual...
Post by Paul Gienger
From the man page on the net command
[RPC|ADS] USER ADD name [password] [-F user flags] [-C comment]
The -F then would seem to set the flags. THIS part is not documented
very intuitively, but is available, in the man page for pdbedit
Well, I got there, and I can't see any of the following lines... How did you
manage to guess that the information is in this man page ?
Maybe the man pages on unix are different from the ones online, but I
doubt it. I used the web page
http://www.samba.org/samba/docs/man/manpages.html as a start.
Post by Nicolas Costes
Post by Paul Gienger
<liberal use of snip>
It must be, because as I said, I can't find any of the following in that man
page. So, I tried to use some of these options into the "net user add"
command, after the "-F" flag, but it keeps returning me "usage()" :-(
Could you give me an example of what you think is the actual syntax to this
flag ? Say, for example, creating a user specifying is homedrive, homepath,
# net rpc user add TestUser -F ????? -U administrator -S server
Maybe a more complete example of what you're trying to get at is in
order... Are you trying to set the contents of those fields or create
the directories that will correspond to them?

If the former, you probably want pdbedit with an option like so:

-h homedir

This option can be used while adding or modifing a user account. It
will specify the user's home directory network path.

Example: *-h "\\\\BERSERKER\\sorce"*

If the latter, why not just use the script you're apparently trying to
write to create the directory? If it's on a different machine, use an
ssh command. If it's on a windows box, you could probably smbmount the
parent and then create the dir. Maybe after a clearer explanation it
will make sense, but for now it sounds like you're trying to use a
hammer to turn in a screw.
--
Paul Gienger Office: 701-281-1884
Applied Engineering Inc. Cell: 701-306-6254
Information Systems Consultant Fax: 701-281-1322
URL: www.ae-solutions.com mailto:***@ae-solutions.com
--
To unsubscribe from this list go to the following URL and read the
instructions: http://lists.samba.org/mailman/listinfo/samba
Nicolas Costes
2004-07-08 17:00:11 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Paul Gienger
Maybe the man pages on unix are different from the ones online, but I
doubt it. I used the web page
http://www.samba.org/samba/docs/man/manpages.html as a start.
Ok, i'll check that.
Post by Paul Gienger
Maybe a more complete example of what you're trying to get at is in
order... Are you trying to set the contents of those fields or create
the directories that will correspond to them?
Well, I think I haven't explained it correctly, sorry.

So, I've got 2 servers. One runs NT (Maybe 2K and AD in a few months) and is
our PDC. The other is running Linux+Samba, and is a file server using
Winbind and "security=domain".
Last year, I created the users account with a crappy DOS + NtResKit batch
script on the PDC (From a text file containing names), then exported the
text file to the Samba file server to process it with a bash script to
create the homedirs, setting permissions, etc... Thank the winbind bringing
NT account into Linux. Fine.
Now, this year, i'm trying to create these accounts ONLY from the Samba file
server, using net rpc commands. I managed to create accounts on the NT
domain, as I said, but they are a little... Empty ;-) -> No password set,
no HomeDrive, no HomePath, no ProfilePath,...

So, maybe I can "fill the fields" of the NT accounts remotely, using some
samba commands ?

And, definitely, my PDC is the NT one, not the Samba server (That would have
been easier, huh ? ;-)).
Post by Paul Gienger
-h homedir
This option can be used while adding or modifing a user account. It
will specify the user's home directory network path.
Example: *-h "\\\\BERSERKER\\sorce"*
If the latter, why not just use the script you're apparently trying to
write to create the directory? If it's on a different machine, use an
ssh command. If it's on a windows box, you could probably smbmount the
parent and then create the dir. Maybe after a clearer explanation it
will make sense, but for now it sounds like you're trying to use a
hammer to turn in a screw.
No, don't worry, it isn't the case ;-)
And I guess that pdbedit only woks on the local Samba machine when it is the
PDC... ?

Btw, thanks :-)

- --
,,
(°> Nicolas Costes
/|\ IUT de La Roche / Yon
( ^ ) Clé publique: http://www.keyserver.net/
^ ^ http://www.gnu.org/philosophy/can-you-trust.fr.html


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA7XyPNc2aXy7LuOgRAmL/AJ4iRrztsh96uNmBasjhQ8oZ/rsLxwCfRA2X
NSRydTL+epz9f8ZZeDXBHQg=
=ARmc
-----END PGP SIGNATURE-----
--
To unsubscribe from this list go to the following URL and read the
instructions: http://lists.samba.org/mailman/listinfo/samba
Continue reading on narkive:
Search results for '[Samba] Net rpc user add and the "-F" flag.' (Questions and Answers)
4
replies
Can someone give me a c++ code...?
started 2007-09-22 18:49:15 UTC
programming & design
Loading...