?
Solved

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

Posted on 2011-03-22
4
Medium Priority
?
357 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 16

Accepted Solution

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

Assisted Solution

by:Joseph Gan
Joseph Gan earned 500 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 1000 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 1000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
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 find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month13 days, 6 hours left to enroll

777 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