Networks linux build your own server help please!

Discussion in 'Tech Support' started by davie107, 28 Mar 2009.

  1. davie107

    davie107 Linux or Windows???

    Joined:
    18 Dec 2007
    Posts:
    73
    Likes Received:
    2
    I decided to follow the guide to build your own server, http://www.bit-tech.net/bits/2007/06/05/build_your_own_server/1 , I installed the new version of xbuntu onto a system, Installed samba, changed the smb.conf file and rebooted samba.

    The next step in the guide is to test that it works by creating a new user and password however when i input the code smbpasswd -a Username it says Failed to modify password entry for user Dave.

    Does anyone have any ideas what to do, i have it connected to my bt home hub alond with another computer and i am able to wirelessly enter \\(whatever the IP of the server is)\homes and the log in box comes up but i cannot use any usernames.

    Hope someone can help

    Dave
     
  2. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    I think the user 'Dave' is already added to the password backend, try:
    Code:
    smbpasswd dave
    (without the -a)
     
  3. Matticus

    Matticus ...

    Joined:
    23 Feb 2008
    Posts:
    3,347
    Likes Received:
    117
    On the tut' that is being run as root, just make sure you are running as root (sudo, or sudo su) before running it.

    Edit: or as glider says, if glider says to do something in linux...seriously...do it!
     
  4. davie107

    davie107 Linux or Windows???

    Joined:
    18 Dec 2007
    Posts:
    73
    Likes Received:
    2
    Right, I have tried both your suggestions, i was working in sudo su so no avail there unfortunately. when i input.
    root@server-desktop:/etc/samba# smbpasswd -a dave and i enter a / no password(s) it says Failed to modify password entry for user dave i then try smbpasswd dave and enter new passwords it says
    Failed to find entry for user dave.
    Failed to modify password entry for user dave


    All ideas welcome

    Dave
     
  5. Matticus

    Matticus ...

    Joined:
    23 Feb 2008
    Posts:
    3,347
    Likes Received:
    117
    A bit of a longshot, but does smbpasswd require you to add a new password which is of atleast 8(I think) characters?

    I guess giving that a go couldn't hurt, unless you have done already.

    Or building on that, perhaps a default minimum length of usernames is in force. Try long username and password.

    Edit: So I have been doing a bit of reading because I know the pain of setting on a linux file server and failing :p. It seems that your command is failing because it cannot find the password file, therefore it doesn't exist.

    touch /etc/samba/smbpasswd

    Try that.
     
    Last edited: 28 Mar 2009
  6. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    Can you post the header (everything under [global]) of your /etc/samba/smb.conf and the output of
    Code:
    ls -al /var/lib/samba/private/
     
  7. klutch4891

    klutch4891 What's a Dremel?

    Joined:
    4 Feb 2008
    Posts:
    693
    Likes Received:
    25
    I just followed the same guide and for me the only password I could change was if the samba username was the same as the log in for the computer.
     
  8. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    IIRC the default location of the samba password file is /var/lib/samba/private/, not /etc/samba. You can of course define your own file in the config.

    The user that you want to add to samba has to exist on the system, or there has to be a samba user file. This is pure logic, because if user X doesn't exist, how can you access his homedir (for instance).
     
  9. klutch4891

    klutch4891 What's a Dremel?

    Joined:
    4 Feb 2008
    Posts:
    693
    Likes Received:
    25
    Well that makes sense. My excuse is that I'm retarded with 'nix.
     
  10. Matticus

    Matticus ...

    Joined:
    23 Feb 2008
    Posts:
    3,347
    Likes Received:
    117
    Ah right, well I just nabbed that off a tutorial thing, I haven't been on linux for a while, I am still trying to find a linux that will work well for me on my desktop. They all seem a bit too easy, they are almost truly plug and play, I want a bit of tinkering, but I am not ready for the extreme (distros like arch) :p
     
  11. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    *cough* Gentoo *cough*
     
  12. davie107

    davie107 Linux or Windows???

    Joined:
    18 Dec 2007
    Posts:
    73
    Likes Received:
    2
     
    Last edited: 28 Mar 2009
  13. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
     
  14. davie107

    davie107 Linux or Windows???

    Joined:
    18 Dec 2007
    Posts:
    73
    Likes Received:
    2
    yes that seems to make sense, with this problem sorted i moved onto the next step to add a FTP server. I went into terminal , sudo su, apt-get install proftpd however i was then met with this -
    root@server-desktop:/home/server# apt-get install proftpd
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Couldn't find package proftpd


    any ideas what to do now

    Thaks again for everyones input

    Dave
     
  15. Matticus

    Matticus ...

    Joined:
    23 Feb 2008
    Posts:
    3,347
    Likes Received:
    117
    try "sudo apt-get update".

    It may be that your packages are not up to date, or for some reason the package has been disabled.

    apt-cache search pkgnames | grep -i ftp

    That will search and list all packages that contain the word ftp, should give you an idea if the package is listed or not.
     
  16. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    As will
    Code:
    apt-cache search ftp
     
  17. davie107

    davie107 Linux or Windows???

    Joined:
    18 Dec 2007
    Posts:
    73
    Likes Received:
    2
    I managed to do the apt-get install proftpd,after updating everything. I am now faced with yet more trouble as i move onto the next step. i enter nano /etc/proftpd/proftpd.conf. int the terminal , and replace the file with the code given in the guide, (http://www.bit-tech.net/bits/2007/06/05/build_your_own_server/5). I then restart the server, and am then faced with this code

    root@server-desktop:/home/server# /etc/init.d/proftpd restart
    * Stopping ftp server proftpd [ OK ]
    * Starting ftp server proftpd - warning: the DisplayFirstChdir directive is deprecated and will be removed in a future release. Please use the DisplayChdir directive.
    - warning: the DisplayFirstChdir directive is deprecated and will be removed in a future release. Please use the DisplayChdir directive.
    - Fatal: <Directory>: missing arguments on line 98 of '/etc/proftpd/proftpd.conf'
    [fail]


    i also tried inserting the code from the guide into the original file wihout replacing andything and was met with the same error.

    Thanks for everyones input,

    Dave
     
  18. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    Look into the original "Build your own server" article/forum thread for an easy fix ;)
     
  19. davie107

    davie107 Linux or Windows???

    Joined:
    18 Dec 2007
    Posts:
    73
    Likes Received:
    2
    thanks glider, i looked on the forum and entered the full config from http://www.bit-tech.net/bits/2007/06/05/build_your_own_server/comments/4, a couple of posts down. Just for clarification after i restarted the server it came up with

    * Stopping ftp server proftpd [ OK ]
    * Starting ftp server proftpd - warning: the DisplayFirstChdir directive is deprecated and will be removed in a future release. Please use the DisplayChdir directive.
    - warning: the DisplayFirstChdir directive is deprecated and will be removed in a future release. Please use the DisplayChdir directive.
    [ OK ]


    Is this ok??

    i moved onto the next step, and was met with oot@server-desktop:/home/server# vncpasswd ~/.vnc/passwd
    Password:
    Verify:
    Couldn't open /root/.vnc/passwd for writing
    root@server-desktop:/home/server#


    any ideas??

    Thanks Dave
     
  20. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    Like I said a million times in the original thread too, VNC is run a USER! so the root@... points out you are doing it wrong ;)
     

Share This Page