سؤال

I'm not very literate with Linux, so my terminology isn't great. I purchased an offshore server I'm using to hold my files, it has Linux - Debian 6 32bit on it and I have installed and setup Samba.

I can access the Guest Share dir.

However, for operations I wanted to make it so I required a username and password, so I tried to manipulate it.

I have tried:

useradd samba-user -m -G users - Nothing happened

I'm unsure of the creation steps behind this and do not understand any of the guides (Due to me not following the terminology of it).

Any help would be much appreciated

هل كانت مفيدة؟

المحلول

Solution:

Setup

  1. Apt-get upgrade
  2. sudo apt-get install samba smbfs
  3. sudo mkdir –m 0777 /pathofdrive

Editing the samba config

  1. sudo vi /etc/samba/smb.conf

Copy this:

# Global parameters
[global]
   workgroup = HOME
   netbios name = SAMBA
   server string = Samba Server %v
   map to guest = Bad User
   log file = /var/log/samba/log.%m
   max log size = 50
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   preferred master = No
   local master = No
   dns proxy = No
   security = User

# Share
[Data]
   path = /disk2/data
      valid users = joel
   read only = No
   create mask = 0777
   directory mask = 0777

Adding a user:

# useradd -c "Joel Nahrgang" joel
# smbpasswd -a joel
New SMB password: secret
Reenter SMB password: secret
Added user joel

Restarting Samba:

sudo /etc/init.d/samba restart

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top