Find the answer to your Linux question:
Results 1 to 6 of 6
Dear Linux users, I've installed ubuntu a few days ago and now I want to install Samba to use the ubuntu pc in my windows network. But the problem is, ...
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    3

    No rights on my own directory's

    Dear Linux users,

    I've installed ubuntu a few days ago and now I want to install Samba to use the ubuntu pc in my windows network.
    But the problem is, I seem to have no rights on my own mappings...
    So now I cant edit the smb.conf file to my own hand.

    I'm logged in with the local account I created when installing ubuntu.

    Thanx in advance,

    Teun

  2. #2
    Just Joined!
    Join Date
    Mar 2010
    Location
    Dehradun,Uttarakhand,INDIA
    Posts
    13
    Try editing file being root
    To have root privileges type:

    $su -

    in the terminal and enter the root password.

    If you have not set the root password , set it by typing command:

    $sudo passwd root

  3. #3
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    i would recommend against setting a root password on ubuntu, they didn't enable it for a reason and you don't *really* need it

    just prefix editing the file with sudo to gain root privilege sudo gedit /etc/samba/smb.conf

  4. #4
    Linux User ptkobe's Avatar
    Join Date
    Feb 2008
    Location
    Torres Vedras, PT
    Posts
    274
    Are you trying to edit it with what?

    If it is from the terminal with something like nano, you have to use sudo to run the command (run as root), like in
    > sudo nano /etc/samba/smb.conf

    That's because, if you run
    > ls -l /etc/samba/smb.conf
    -rw-r--r-- 1 root root 12412 2010-03-25 19:45 /etc/samba/smb.conf
    you can see it is owned by root, group root

    If ypu want ro use a graphical editor, same thing, you'll have to run the editor as root to be able to edit a root owned file. Try
    > sudo gedit /etc/samba/smb.conf
    for example

    EDIT: Ooops, already answered

  5. #5
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Just to note, the correct way to open a graphical application with root privileges is to use gksudo over just sudo.

    Code:
    gksudo gedit /etc/samba/smb.conf
    In a lot of cases it doesn't really matter, but in a few it does, and hey, better to be in the habit of doing it the right way.

    Running Sudo Graphically

  6. #6
    Linux User ptkobe's Avatar
    Join Date
    Feb 2008
    Location
    Torres Vedras, PT
    Posts
    274
    reed9: Point taken
    Thanks, and for the link

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...