Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-26-2003, 07:17 PM   #1
LQ Newbie
Registered: Aug 2003
Posts: 11

Rep: Reputation: 0
Red face Help with Samba on RH7.2

i am trying to start my samba. I follow the book RedHat Linux 7.2 bible in setting up samba configuration, adding samba and start the samba.
Along the line I have problem when I typed # cat /etc/passwd | /usr/bin/ > /etc/samba/smbpasswd. Well I cant find any file called in that directory so is when i typed samba start to start samba.
Anyone please help me !!! I am trying to connect my win2k with my linux box and gradually increasing the number of windows comp into the network. Thanks in advance.
Old 08-27-2003, 09:05 AM   #2
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313

Rep: Reputation: 30
I found this information on the O'reilly book website: Adding entries to smbpasswd
There are a few ways you can add a new entry to the smbpasswd file:

You can use the smbpasswd program with the -a option to automatically add any user that currently has a standard Unix system account on the server. This program resides in the /usr/local/samba/bin directory.

You can use the addtosmbpass executable inside the /usr/local/samba/bin directory. This is actually a simple awk script that parses a system password file and extracts the username and UID of each entry you wish to add to the SMB password file. It then adds default fields for the remainder of the user's entry, which can be updated using the smbpasswd program later. In order to use this program, you will probably need to edit the first line of the file to correctly point to awk on your system.

In the event that the neither of those options work for you, you can create a default entry by hand in the smbpasswd file. The entry should be entirely on one line. Each field should be colon-separated and should look similar to the following:

This consists of the username and the UID as specified in the system password file, followed by two sets of exactly 32 X characters, followed by the account flags and last change time as it appears above. After you've added this entry, you must use the smbpasswd program to change the password for the user.

You may want to note that the directories for redhat are not the same as the ones in the paragraph above. On my box, the bin directory for Samba is /usr/bin, not /usr/local/samba/bin. It depends on whether you use a stock samba setup from your distro or download samba from the internet as to where it sets up.
Old 08-27-2003, 09:09 AM   #3
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313

Rep: Reputation: 30
Something else that may help. When you get a program that does not seem to run, see if:

1. the program exists and
2. the correct path if it does exists.

For example, sonce your not sure about this shell script, type in:

find / -name

to see if it exists anywhere on the machine at all. Then you could adjust your path in your statement if neccesary.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
setting up a printer with cups on RH7 for windows with samba TreeHugger Linux - Networking 2 11-11-2004 11:31 AM
Samba on RH7.3 talking to W2K DC AutoBahn Linux - Networking 0 02-24-2004 05:44 PM
Samba and RH7.2 Arot Linux - Newbie 4 08-29-2003 11:59 AM
Samba, RH7.3 and Windows 2000 whaase Linux - Networking 10 10-04-2002 07:41 PM
Samba and Swat in RH7 jfisk Linux - Newbie 5 11-01-2001 08:19 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration