Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Virtual Box issue 6 82
linux pull logs and export FTP 4 58
Why isn't object file created? 6 39
installing LSI MegaRAID Storage Manager on CentOS 7 22 54
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…
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 …
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

932 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

14 Experts available now in Live!

Get 1:1 Help Now