[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Samba on Redhat 8

Posted on 2006-04-19
4
Medium Priority
?
258 Views
Last Modified: 2013-11-13
Samba was not working properly so i downloaded a new version, I did the ./configure , the make , then make install and installed it.  

I installed it to
/usr/local/samba/bin/smbd

and not the stock location.  

however I am using webmin to administrate the box,  I am not sure where smb is located to start the service , webmin thinks i am using version 2.28 and I am not I am using a newer version, I upgraded all the module patch with the exception of the start and stop because I did not know where smb is located any ideas ?
0
Comment
Question by:focusen
  • 2
  • 2
4 Comments
 

Author Comment

by:focusen
ID: 16492077
Please someone HELP!
0
 
LVL 22

Accepted Solution

by:
pjedmond earned 1500 total points
ID: 16492862
If you have done the installation this way, the chances are that all the bits you are after are under the:

/usr/local/samba

directory
If you "ls /usr/local/samba"

You'll have a bin directory for binaries, etc for configuration files, tmp for tmp files and so on. Explore whatever files you've got there and you will find that they relate to the this particular installation of smb

The problem is that webmin is looking for the 'default' installations and from what you are saying, I suspect that you have another version installed. Ideally, you only want one version living on your system, otherwise you may get a little confused therefore:

1.  Check for samba rpm installations:

rpm -qa | grep smb

This will list any versions of samba. If you are 100% sure that you want to remove this version then it can be removed using rpm -e..........BUT...this does not remove configuration files such as /etc/smb.conf or /etc/samba/smb.conf, or similar associated config files, which will need to be removed manually in order to prevent webmin getting confused by them.

2.    Check for other smbd binaries that might exist:

find /usr | grep smbd
find /bin | grep smbd
find /sbin | grep smbd

They'll take some time, but may identify another smbd binary on your system. You may notice when you've foiund it an associated smb etc, bin, tmp file structure that would need to be removed in order to remove this instance of a the daemon.

Once you're happy that you've got one, and only the one you want, webmin will want to know the location of the /etc/smb.conf , and also the sysV init. For RH systems it normally located at /etc/init.d/smbd

HTH:)

0
 
LVL 22

Expert Comment

by:pjedmond
ID: 16492916
A sysV script that you could use (but may need modifying for your situation):
---------------8X------------------------------------------------------------------------
#!/bin/sh
#
# chkconfig: - 91 35
# description: Starts and stops the Samba smbd and nmbd daemons \
#              used to provide SMB network services.
#
# pidfile: /var/run/samba/smbd.pid
# pidfile: /var/run/samba/nmbd.pid
# config:  /etc/samba/smb.conf

# Avoid using root's TMPDIR
unset TMPDIR

# Source networking configuration.
. /etc/sysconfig/network

if [ -f /etc/sysconfig/samba ]; then
   . /etc/sysconfig/samba
fi

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

# Check that smb.conf exists.
[ -f /etc/samba/smb.conf ] || exit 0

# Check that we can write to it... so non-root users stop here
[ -w /etc/samba/smb.conf ] || exit 0


RETVAL=0


start() {
        KIND="SMB"
        echo -n $"Starting $KIND services: "
        daemon smbd $SMBDOPTIONS
        RETVAL=$?
        echo
        KIND="NMB"
        echo -n $"Starting $KIND services: "
        daemon nmbd $NMBDOPTIONS
        RETVAL2=$?
        echo
        [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/smb || \
           RETVAL=1
        return $RETVAL
}

stop() {
        KIND="SMB"
        echo -n $"Shutting down $KIND services: "
        killproc smbd
        RETVAL=$?
        echo
        KIND="NMB"
        echo -n $"Shutting down $KIND services: "
        killproc nmbd
        RETVAL2=$?
        [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb
        echo ""
        return $RETVAL
}

restart() {
        stop
        start
}

reload() {
        echo -n $"Reloading smb.conf file: "
        killproc smbd -HUP
        RETVAL=$?
        echo
        return $RETVAL
}

rhstatus() {
        status smbd
        status nmbd
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  reload)
        reload
        ;;
  status)
        rhstatus
        ;;
  condrestart)
        [ -f /var/lock/subsys/smb ] && restart || :
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}"
        exit 1
esac

exit $?
---------------8X------------------------------------------------------------------------
HTH:)
0
 

Author Comment

by:focusen
ID: 16492998
well I think samba is running.  the old webmin uses smb command to start I believe tthe new version uses smbd ?  Correct?  Do you have a sample of a samb.conf file , I want to create shares that all users can browe without requireing a password?  is this possible.. They are browsing from a windows box any ideas ?
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month20 days, 14 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question