Linux mint перезапустить samba

Linux Mint Forums

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

Unable to restart Samba

Post by GiuTor » Sun Jul 30, 2017 5:16 am

when I try to restart samba from the command line I get this:

$ sudo service smbd restart
Failed to restart smbd.service: Unit smbd.service not found.

How do I restart the samba server wihout restarting the laptop?

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

Re: Unable to restart Samba

Post by rene » Sun Jul 30, 2017 5:26 am

Re: Unable to restart Samba

Post by altair4 » Sun Jul 30, 2017 8:19 am

Is this a new installation of Mint 18?

sudo apt-get install samba --install-recommends

Mint 18 does not install samba ( the server part ) by default so you need to install it yourself.

sudo service smbd restart

Side note: smb.conf is present by default because it’s used by the samba client and that is installed by default.

Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Re: Unable to restart Samba

Post by rene » Sun Jul 30, 2017 10:41 am

Yes, that is better. If useful to make explicit, the thing here is.

service is a wrapper script which has always been considered to be an upstart/sysvinit wrapper script; indeed it has however turned into a systemd/upstart/sysvinit wrapper script in Mint 18 I now see. The «service smbd restart» does on Mint 18 translate to the mentioned systemctl call, but/and certainly then both provide you with the same error(s). The systemd/upstart difference is not the issue here: indeed not having samba installed is.

Which is by the way not to say that I would not in fact prefer direct use of systemctl now that systemd is de facto linux-generic. But YMMV.

  • Important Notices
  • ↳ Rules & Notices
  • ↳ Releases & Announcements
  • ↳ Main Edition Support
  • ↳ Beginner Questions
  • ↳ Installation & Boot
  • ↳ Software & Applications
  • ↳ Hardware Support
  • ↳ Graphics Cards & Monitors
  • ↳ Printers & Scanners
  • ↳ Storage
  • ↳ Sound
  • ↳ Networking
  • ↳ Virtual Machines
  • ↳ Desktop & Window Managers
  • ↳ Cinnamon
  • ↳ MATE
  • ↳ Xfce
  • ↳ Other topics
  • ↳ Non-technical Questions
  • ↳ Tutorials
  • Debian Edition Support
  • ↳ LMDE Forums
  • ↳ Beginner Questions
  • ↳ Installation & Boot
  • ↳ Software & Applications
  • ↳ Hardware Support
  • ↳ Networking
  • ↳ Tutorials
  • ↳ Other Topics & Open Discussion
  • ↳ LMDE Archive
  • Interests
  • ↳ Gaming
  • ↳ Scripts & Bash
  • ↳ Programming & Development
  • Customization
  • ↳ Themes, Icons & Wallpaper
  • ↳ Compiz, Conky, Docks & Widgets
  • ↳ Screenshots
  • ↳ Your Artwork
  • Chat
  • ↳ Introduce Yourself
  • ↳ Chat about Linux Mint
  • ↳ Chat about Linux
  • ↳ Open Chat
  • ↳ Suggestions & Feedback
  • International
  • ↳ Translations
  • ↳ Deutsch — German
  • ↳ Español — Spanish
  • ↳ Français — French
  • ↳ Italiano — Italian
  • ↳ Nederlands — Dutch
  • ↳ Português — Portuguese
  • ↳ Русский — Russian
  • ↳ Suomi — Finnish
  • ↳ Other Languages
  • ↳ Čeština-Slovenčina — Czech-Slovak
  • ↳ Magyar — Hungarian
  • ↳ 日本語 — Japanese
  • ↳ Polski — Polish
  • ↳ Svenska — Swedish
  • ↳ Українська — Ukrainian
Читайте также:  Линукс команды терминала установка

Powered by phpBB® Forum Software © phpBB Limited

Источник

How to Restart Samba Server?

On Linux, Samba Server allows the file-sharing mechanism across the different operating systems in a network. It is an open-source software tool, beneficial for accessing desktop files from a Linux system and sharing with macOS, and Windows.

It contains a configuration file in which time-by-time modifications occur. So it is recommended to restart it after editing to make the changes effective.

This post pens down possible ways to restart Samba Server on Linux with the following highlights:

Method 1: Using the “systemctl” Command

The “systemctl” command-line tool manages the “systemd” initialization system and service manager. It allows the user to interact with the services using options such as “start”, “enable”, “stop”, “disable” and view.

Restart Samba Server

Execute the “systemctl” command followed by the “restart” options and the superuser privileges i.e “sudo” to restart the samba server:

$ sudo systemctl restart smbd

The error-free output confirms that “smbd(Samba)” server is restarted.

Check Samba Status

If the user wants to check the current status of the “Samba” server then use the “status” with the “systemctl” command:

$ sudo systemctl status smbd

The Samba server is now in “active (running)” state.

Method 2: Using the “service” Command

The other tool is the “service” command utility utilized to execute a SystemV init script located in the in /etc/init.d directory. It can also start, stop, restart, reload, and enable the services like the systemctl command.

Читайте также:  При загрузке linux появляется grub

Restart Samba Server

Type the “restart” flag alongside the “sudo” and “service” commands for restarting the “smbd” server in the following way:

$ sudo service smbd restart

It provides the same output as the “systemctl” command.

Conclusion

Linux offers the “systemctl” and “service” command line tools to restart the “Samba” server instantly. Both commands use the “sudo” i.e root user access if the normal user is logged in. All Linux distributions support these built-in command utilities. This post has demonstrated all possible ways to restart the Samba Server.

Источник

Linux Mint Forums

Forum rules
There are no such things as «stupid» questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

How to restart Samba on Linux Mint 20.1

Post by jsprenkle » Tue May 04, 2021 9:38 pm

I’ve tried every service restart variation I’m aware of, but none work ( service, systemctl, and init.d )
How do I restart smb ?

Any chance the forum could be organized by operating system version?
Wading through solutions for software I’m not running makes it much more difficult.

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

kato181 Level 8
Posts: 2439 Joined: Fri Mar 24, 2017 12:33 am Location: Frederickton NSW

Re: How to restart Samba on Linux Mint 20.1

Post by kato181 » Tue May 04, 2021 11:10 pm

Re: How to restart Samba on Linux Mint 20.1

Post by jsprenkle » Wed May 05, 2021 1:13 am

ay@jay-linux:/etc$ sudo service smbd start [sudo] password for jay: Failed to start smbd.service: Unit smbd.service not found. jay@jay-linux:/etc$ 

kato181 Level 8
Posts: 2439 Joined: Fri Mar 24, 2017 12:33 am Location: Frederickton NSW

Re: How to restart Samba on Linux Mint 20.1

Post by kato181 » Wed May 05, 2021 3:30 am

Re: How to restart Samba on Linux Mint 20.1

Post by jsprenkle » Wed May 05, 2021 8:00 am

jay@jay-linux:/etc$ ps -aux|grep smb jay 5131 0.5 0.0 563348 15688 ? SLl Apr15 147:29 /usr/libexec/gvfsd-smb --spawner :1.7 /org/gtk/gvfs/exec_spaw/1 jay 11545 0.0 0.0 629048 19100 ? SLl Apr15 0:00 /usr/libexec/gvfsd-smb-browse --spawner :1.7 /org/gtk/gvfs/exec_spaw/4 root 507401 0.0 0.0 0 0 ? I< Apr28 0:00 [smb3decryptd] jay 579380 0.0 0.0 489516 17744 ? SLl Apr30 0:00 /usr/libexec/gvfsd-smb --spawner :1.7 /org/gtk/gvfs/exec_spaw/42 jay 765170 0.0 0.0 9040 664 pts/0 S+ 06:48 0:00 grep --color=auto smb jay@jay-linux:/etc$ systemctl restart samba 

Re: How to restart Samba on Linux Mint 20.1

Post by jsprenkle » Wed May 05, 2021 8:01 am

Читайте также:  Linux изменить пароль пользователя консоль

kato181 wrote: ⤴ Wed May 05, 2021 3:30 am looks like samba isn't installed..
sudo apt-get install samba

/etc/samba/smb.conf is present on my system.
It seems like it should not be if samba is not installed.

Re: How to restart Samba on Linux Mint 20.1

Post by altair4 » Wed May 05, 2021 8:10 am

You will have an smb.conf if smbclient is installed but not have an smbd service if you don't have the samba package installed.

Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Thanks! I got SAMBA working on Mint 20.3

Post by williebthe3rd » Tue Nov 22, 2022 10:00 pm

Following the advice in this thread and others, I was able to regain access to my Windows XP machine's network share. That machine doesn't surf the web, it's behind a firewall. It plays music over a tiny FM transmitter, so I have my own radio station. It needs to run on XP, so that's the WHY.

I was searching, repeatedly, and getting bits and pieces. but not a good "step-by-step". What I had to do to make my new Mint 20.3 talk to it was install the older SAMBA. and then configure it. Here is what I did that worked. I hope this saves someone some time!

sudo apt-get install samba 

Once installed, I had to edit: etc\samba\smb.conf file

That file has to be opened by launching the text editor with:

I then used the file manager to drag/drop the file into the "Elevated privilege" text editor, where I pasted the following:

# Change this to the workgroup/NT-domain name your Samba server will part of workgroup = WORKGROUP client min protocol = NT1 client lanman auth = yes client ntlmv2 auth = no server min protocol = NT1 ntlm auth = Yes security = user client use spnego = no name resolve order = bcast host lmhosts wins

Then SAVE the file and close the editor & terminal.

Then, in the Control Center in the main Mint menu, "Startup Applications" I added two new ones as follows:

Name: "Start Samba 1"
Command: echo (my PW) | service smbd start

Name: "Start Samba 2"
Command: echo (my PW) | service nmbd start

(use your password without the parenthesis to run these commands followed by the pipe symbol)

Now, every time my machine boots up, my older machines on my Windows network are accessible again.

Источник

Оцените статью
Adblock
detector