Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use samba's "net" command without specifying a password?

Status
Not open for further replies.

rslegers

Programmer
Sep 8, 2005
2
BE
We're running Samba 3 as PDC on HP-UX 11.00 servers.
Is it possible, when logged on as root on the samba server, to use the "net" command without having to specify a password?

We need to use "net" in a configuration program, to automatically configure the users, without any user intervention.
Currently (for our tests) we supply a HARDCODED password on the command line, using the -U argument (net ... -U <user>%<password>). This is of course not a very elegant or secure option...
THX
 
You may play with the USER environment variable.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks for your reply, but that doesn't work for the net command: it still asks for the password.
I noticed however (in the man pages) that aside from USER there are also PASSWD and even PASSWD_FILE variables for certain samba commands.

For the net command only the PASSWD variable seems to work: I put the password in PASSWD and indeed, the net command didn't ask for the password anymore. This gives us an alternative solution, but it still isn't ideal: we still have to hardcode the password.

So, my question remains...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top