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



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'
fcekAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
medveddConnect With a Mentor Commented:
If by '#' you mean to be root - yes.
0
 
Joseph GanConnect With a Mentor System AdminCommented:
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
 
thebrunoConnect With a Mentor Commented:
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
 
thebrunoConnect With a Mentor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.