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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BASH: net : command not found

Status
Not open for further replies.

frummel

Technical User
Jun 21, 2002
91
NL
Hi I'm trying to configure samba, and am trying to groupmap some Domain Groups with Unix groups.

I created a file called Groups.sh, when running, I get the message:

Code:
line 8: net: command not found
line 9: net: command not found
line 10: net: command not found
line 13: net: command not found
line 14: net: command not found

My Groups.sh file looks like:

Code:
# Create UNIX groups
groupadd g_knitting
groupadd g_drawing

# Map Windows Domain Groups to UNIX groups
net groupmap modify ntgroup="Domain Admins" unixgroup=root
net groupmap modify ntgroup="Domain Users" unixgroup=users
net groupmap modify ntgroup="Domain Guests" unixgroup=nobody

# Add Functional Domain Groups
net groupmap add ntgroup="Knitting Department" unixgroup=g_knitting type=d
net groupmap add ntgroup="Drawing Department" unixgroup=g_drawing type=d

Can someone tell me what's missing?
How do I fix this?
 
Basically the error "net: command not found" means there is no binary to execute.

The first 3 lines of your shell script are fine. Everything below is questionable.

 
Net is part of the samba suite.

On my fedora box it is part of samba-common and installed in /usr/bin/net. If you installed from source you probably need to add the bin directory to your path. If you installed from rpm you can use rpm -ql samba-common | grep net to find it.
 
Type 'net' from a prompt and see what you get. You may have to change the path or move it to a point on the existing path.
 
Hi there, thank you everybody for your reply.

I noted I had only installed the samba rpm.
After installing samba-common & samba-client I could use the net command.

I feel a bit stupid now though...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top