Solved

Fedora / Samba - n00b  - do you have to be at # to "service smb restart"

Posted on 2011-03-22
4
310 Views
Last Modified: 2012-05-11


and also to:  Id prefer not to be at # as it can be dangerous - do I have to be for these commands?

[root@server1 samba]# cp -v smb.conf smb.bak
`smb.conf' -> `smb.bak'
0
Comment
Question by:fcek
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
medvedd earned 125 total points
ID: 35193171
If by '#' you mean to be root - yes.
0
 
LVL 16

Assisted Solution

by:Joseph Gan
Joseph Gan earned 125 total points
ID: 35193228
At "#" promb in *inx means you log in as "root", for restart any services you need to run as "root", so yes for the first question.
The second "cp" command, you don't have to run as root, but based on the permision of the fle itself, in this case file smb.conf usually owned by root as well, so you still need to be run as "root".
0
 
LVL 3

Assisted Solution

by:thebruno
thebruno earned 250 total points
ID: 35193229
To keep from being logged in as root (#) you could type:

sudo service smb restart

It will then prompt you for your root password (sudo just runs a single command as root)
0
 
LVL 3

Assisted Solution

by:thebruno
thebruno earned 250 total points
ID: 35193252
also, with your second command, just put sudo at the beginning if it doesn't work as you typed it...

sudo cp -v smb.conf smb.bak

but the `smb.conf' -> `smb.bak' means it worked. :)
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now