LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Another samba trouble (https://www.linuxquestions.org/questions/linux-newbie-8/another-samba-trouble-909223/)

static360 10-20-2011 05:20 PM

Another samba trouble
 
Ok i have searched this forum and i saw some stuff on some of the problems and i tried them but still nothing. as a bit of info i am a student at a university taking redhat course and am on one of the workbooks and it is due next week and i am f**king furstrated with this damn samba. this is the output of the grading script if by any chance anybody can offer some sort of solution or so i am willing to trying anything at this point for the part that it said username my redhat username goes in there but i replaced it with username.


Results
stdout
10/20/11 13:10:37 @rha@ checkpoint username can connect
cmd: su - username -c "smbclient -U username%password -c 'ls' //localhost/private"
command return code: 1
comamnd stdout:
session setup failed: NT_STATUS_LOGON_FAILURE

10/20/11 13:10:37 @rha@ result 0 10 the command 'smbclient -U username%password -c 'ls' //localhost/private' failed
10/20/11 13:10:37 @rha@ checkpoint username can download getme
cmd: su - username -c "smbclient -U username%password -c 'get getme' //localhost/private"
command return code: 1
comamnd stdout:
session setup failed: NT_STATUS_LOGON_FAILURE

10/20/11 13:10:38 @rha@ result 0 10 the command 'smbclient -U username%password -c 'get getme' //localhost/private' failed
10/20/11 13:10:38 @rha@ checkpoint username can upload putme
cmd: su - username -c "smbclient -U username%password -c 'put /tmp/putme putme.username' //localhost/private"
command return code: 1
comamnd stdout:
session setup failed: NT_STATUS_LOGON_FAILURE

10/20/11 13:10:38 @rha@ result 0 10 the command 'smbclient -U username%password -c 'put /tmp/putme putme.username' //localhost/private' failed
10/20/11 13:10:38 @rha@ checkpoint username_a can connect
cmd: su - username -c "smbclient -U username_a%password -c 'ls' //localhost/private"
command return code: 1
comamnd stdout:
session setup failed: NT_STATUS_LOGON_FAILURE

10/20/11 13:10:39 @rha@ result 0 10 the command 'smbclient -U username_a%password -c 'ls' //localhost/private' failed
10/20/11 13:10:39 @rha@ checkpoint username_a can download getme
cmd: su - username -c "smbclient -U username_a%password -c 'get getme' //localhost/private"
command return code: 1
comamnd stdout:
session setup failed: NT_STATUS_LOGON_FAILURE

10/20/11 13:10:39 @rha@ result 0 10 the command 'smbclient -U username_a%password -c 'get getme' //localhost/private' failed
10/20/11 13:10:39 @rha@ checkpoint NOT username_a can upload putme
cmd: su - username -c "smbclient -U username_a%password -c 'put /tmp/putme putme.username_a' //localhost/private"
command return code: 1
comamnd stdout:
session setup failed: NT_STATUS_LOGON_FAILURE

10/20/11 13:10:40 @rha@ result 10 10 NOT username_a can upload putme
10/20/11 13:10:40 @rha@ checkpoint NOT username_b can connect
cmd: su - username -c "smbclient -U username_b%password -c 'ls' //localhost/private"
command return code: 1
comamnd stdout:
session setup failed: NT_STATUS_LOGON_FAILURE

10/20/11 13:10:40 @rha@ result 10 10 NOT username_b can connect
10/20/11 13:10:40 @rha@ score 20 70

checkpoint: username can connect
score: 0 out of 10 the command 'smbclient -U username%password -c 'ls' //localhost/private' failed

checkpoint: username can download getme
score: 0 out of 10 the command 'smbclient -U username%password -c 'get getme' //localhost/private' failed

checkpoint: username can upload putme
score: 0 out of 10 the command 'smbclient -U username%password -c 'put /tmp/putme putme.username' //localhost/private' failed

checkpoint: username_a can connect
score: 0 out of 10 the command 'smbclient -U username_a%password -c 'ls' //localhost/private' failed

checkpoint: username_a can download getme
score: 0 out of 10 the command 'smbclient -U username_a%password -c 'get getme' //localhost/private' failed

checkpoint: NOT username_a can upload putme
score: 10 out of 10 NOT username_a can upload putme

checkpoint: NOT username_b can connect
score: 10 out of 10 NOT username_b can connect
Score: 28 out of 100

static360 10-20-2011 05:24 PM

This is the exercise that am doing

Specification

In this exercise you will create a Samba share called "private", which will be access-controlled depending on the user who connects.

Ensure that Samba service is installed and ready.

Create a group called trusted. Make your primary and your secondary accounts (<username> and <username>_a) members.

Create the directory /var/shared/private (it may already exist from a previous exercise).

Make the directory group-owned by trusted and writable by user and group.

Create a file called /var/shared/private/getme and ensure it it is readable by everyone.

Open /etc/smb.conf and add a share called private.

Make the share accessible only by members of the trusted group.

Make the share read-only, except for your primary account, which should have write access.

Reload you samba configuration and test.

For example, the following smb.conf entry would satisfy these requirements:

[private]
path = /var/shared/private
valid users = @trusted
writable = no
write list = elvis

Deliverables

The directory /var/shared/private should be shared via SMB

The share should only be accessible to members of the trusted group, which should include your primary and secondary accounts.

The share should only be writable by your primary account

allend 10-20-2011 06:14 PM

As you are a student, all I will say is that the answer is contained here. http://www.samba.org/samba/docs/man/...FastStart.html

static360 10-20-2011 08:45 PM

Well as i was reading over the script again for the 100th time it seems the grading script said to assign a specific password for the users that was stated and i assigned a different one to the users, FML for spending hours on this.


All times are GMT -5. The time now is 12:37 AM.