Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: jac378 on June 27, 2013, 07:35:21 pm

Title: Thinclient question
Post by: jac378 on June 27, 2013, 07:35:21 pm
Hi,

I have setup zentyal and all is nice. The thinclient boots up fine and I included testdisk on it, but when I try to run it on the thinclient terminal it asks for a sudo password, none works, how do I enable that?

Thanks
Title: Re: Thinclient question
Post by: half_life on June 28, 2013, 12:30:18 am
When you say terminal,  do you mean the initial login screen? Or after you login and open a terminal is it asking then?  If it is the second option,  is it saying something like user not in sudoers file ?
Title: Re: Thinclient question
Post by: jac378 on June 28, 2013, 03:51:46 pm
Hi,

Thanks for the reply.
Its the second option, I have added to the thinclient the testdisk application and when I run it from the terminal in the thinclient environment it says that this application needs to be run with sudo..etc...

I do sudo testdisk, it ask for the sudo password and none works, not even the first password for the admin that we create on the initial Zentyal installation.

And this happens with any application that needs elevated privileges,  remember I am using the Administrator account and also any new user that belongs to admin....it simply says incorrect password.

The sudo testdisk (or any other) works fine on the server with these user/passwords that I have.

Thanks
Title: Re: Thinclient question
Post by: half_life on June 29, 2013, 02:56:00 am
When you login, you use a user name and password.  That user must be in the admin group (unix group) to be able to execute root privileges.  The user you created when you installed Zentyal has those privileges. Login with that user and open a command prompt.  Run sudo testdisk and enter the same password that you used to login with.

Forgive me if that is what you have done, I am just covering the bases.
Title: Re: Thinclient question
Post by: jac378 on June 29, 2013, 03:46:36 am
Yes, I have done.

This is when I boot up a computer with PXE, I get the thinclient Ubuntu Environment. I go to terminal I run sudo testdisk it ask for sudo password, I type the one you are referring to and it say incorrect.

I do it three times and the same .... I have enabled PAM (I think its called) and created a new admin account (new user), I boot up the computer PXE, get the GUI..sudo testdisk..same error.....

Title: Re: Thinclient question
Post by: half_life on June 29, 2013, 03:54:32 am
Ok,  lets try this go to the physical machine and type in the following
Code: [Select]
sudo group -a sudo <your user name here>

This will give the named user the equivalent rights as root.

Then try the same tests as before on the thin client.
Title: Re: Thinclient question
Post by: jac378 on June 29, 2013, 03:58:49 am

Oh I am at home, I am connected via VPN I can only ssh that but I wont be able to see if it works.....

I guess I will have to wait till tomorrow...!@#
Title: Re: Thinclient question
Post by: jac378 on June 29, 2013, 04:01:23 am
I ssh and it says:

sudo: group: command not found
Title: Re: Thinclient question
Post by: half_life on June 29, 2013, 04:53:29 am
Sorry ...  embarrassed look. 

usermod -a -G sudo <user name>


ETA: the -G option.   I normally use a text editor directly on the group file instead of the command.
Title: Re: Thinclient question
Post by: jac378 on June 29, 2013, 04:46:26 pm
Thanks,

When I run


usermod -a sudo jcanepa

I get the list of option for the usermod command..
Title: Re: Thinclient question
Post by: jac378 on June 29, 2013, 07:14:39 pm
can this help me?

https://help.ubuntu.com/community/UbuntuLTSP/UnlockChrootRootAcct


what I dont understand is if I have to run that on the server terminal..
Title: Re: Thinclient question
Post by: half_life on June 29, 2013, 07:54:21 pm
Not necessary.  This is my home system and I have performed a network boot on a virtualbox VM.  I have logged in with the user that I created when I installed Zentyal.  I opened a terminal and ran the command sudo su (gain root privilege and keep it).

As you can see,  it lets me run the sudo command
Title: Re: Thinclient question
Post by: half_life on June 29, 2013, 07:57:19 pm
This is the same general setup except I have logged in as a general user.
Title: Re: Thinclient question
Post by: half_life on June 29, 2013, 08:02:26 pm
Now I have added the user to the sudo group (note that you need to logout and log back in to gain the new privilege)

See that it now lets me.
Title: Re: Thinclient question
Post by: half_life on June 29, 2013, 08:20:25 pm
Given the close proximity in time between our posts you may have missed where I corrected the command line.  I usually just open a text editor and modify the group file. 

The correct command is

usermod -a -G sudo jcanepa

Title: Re: Thinclient question
Post by: half_life on June 29, 2013, 08:30:37 pm
I am anticipating your next question is:
For users that are created using the web gui and therefore only exist in ldap,  does the same settings apply?

Yes.  My user dhoff is a user that only exists in ldap but group settings apply to the user. 

Running   grep dhoff  /etc/passwd   gives no results.

Be careful adding a user to the sudo group gives them root privileges. For more granular control over what the user can do, you will need ot setup your sodoers file.
Title: Re: Thinclient question
Post by: jac378 on June 29, 2013, 09:10:50 pm
Before your reply I did
https://help.ubuntu.com/community/UbuntuLTSP/UnlockChrootRootAcct

and now at login screen  when typing jcanepa ...password

"No response from the server, restarting"

It get back the login screen.

I will undo that, and the get back on your command
Title: Re: Thinclient question
Post by: jac378 on June 29, 2013, 10:12:29 pm
I have deleted the Thinclient and started from the beginning.

Same problem sudo password not correct, now I am apllying
 
usermod -a -G sudo jcanepa

I'll get back
Title: Re: Thinclient question
Post by: jac378 on June 29, 2013, 10:13:10 pm
jcanepa@CRSsrv:~$ usermod -a -G sudo jcanepa
usermod: cannot lock /etc/passwd; try again later.
jcanepa@CRSsrv:~$






Title: Re: Thinclient question
Post by: jac378 on June 29, 2013, 10:15:06 pm
Now I added sudo..

jcanepa@CRSsrv:~$ sudo usermod -a -G sudo jcanepa
[sudo] password for jcanepa:
jcanepa@CRSsrv:~$


I am testing the thinclient next
Title: Re: Thinclient question
Post by: jac378 on June 29, 2013, 10:19:05 pm
Same..
Title: Re: Thinclient question
Post by: half_life on June 29, 2013, 10:34:36 pm
Could you describe your setup for me?  I am looking at an Ubuntu Unity desktop,  Zentyal loads the LXDE desktop by default when installed from the cd image.  Did you do an Ubuntu + Zentyal install?  What thin client hardware are you using?  Or are you doing the same as me and network booting a virtual machine? 
Title: Re: Thinclient question
Post by: jac378 on June 29, 2013, 10:42:01 pm
Yes , I was going to explain..

I needed a server and desktop all in one...so I tried the zentyal iso but it was not good for me, so I did:

Ubuntu Server...
Then added Ubuntu Desktop
and last added zentyal...

The thin client is setup in Zentyal..everything else too
Title: Re: Thinclient question
Post by: half_life on June 29, 2013, 10:53:51 pm
Do you have the package ltsp-server installed?  Zentyal-ltsp should be the only one.
Title: Re: Thinclient question
Post by: jac378 on June 29, 2013, 10:56:36 pm
mm no , I never installed it.
The only way here I think is to add testdisk to not to ask for password
Title: Re: Thinclient question
Post by: half_life on June 29, 2013, 11:18:46 pm
You might want to check to see if it is installed.   Install Synaptic and do a search for ltsp.  I suspect that you are dealing with dueling configuration files.  Another question would be if Zentyal 3.0 or Zentyal 3.1 has been installed. 
Title: Re: Thinclient question
Post by: jac378 on June 30, 2013, 04:15:52 pm
I did

dpkg --get-selections

I get:

ltsp-server               install

zentyal-ltsp               install









Title: Re: Thinclient question
Post by: half_life on June 30, 2013, 05:42:23 pm
I must confess I am at a loss as to what is going on here.  My setup is a plain vanilla install from the cd image. It is not chrooted which yours appears to be.  Perhaps someone else will be able to help.  You could try uninstalling the zentyal-ltsp package, then purge the ltsp-server package before re-installing the ltsp-zentyal package.
Title: Re: Thinclient question
Post by: jac378 on June 30, 2013, 09:45:52 pm
Ok thank you for all,..
Title: Re: Thinclient question
Post by: jac378 on July 02, 2013, 09:13:54 pm
To refresh the question.
Setup:

Fresh Ubuntu Server Install.
Added Ubuntu Desktop.
Added Zentyal

Setup :

DHCP (working)
Shares (working on main folder - subfolders have denied access dont know why yet.)
Users (working)
VPN (working)

The problem is on Thin Client

Everything works, boots up fine.
But I dont know what the sudo password is.
I have tried all the password that I know...

Thanks

In addition, one of the attempts to get it fix, was to remove the:
ltsp-server and Zentyal-server, and then just install Zentyal-server..
Same situation..