Solved

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

Posted on 2011-03-22
4
354 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 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

696 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