su in gambas

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

su in gambas

Postby kricit » Wed Sep 28, 2005 2:26 pm

Hi all, I have been trying to add more functionality to my gambas application by allowing rrot access because i think that it is important to the application but when i send the bash command "su" it refuses it with a message like this "su not a standard tty" what does it mean and how can i fix this problem!

Thanks in advance for any help regarding this question.

Ashley Johnson
Kricit Project
Kricit :: Open Source Freedom
User avatar
kricit
 
Posts: 3
Joined: Fri Sep 16, 2005 2:36 pm

RE: su in gambas

Postby nelz » Wed Sep 28, 2005 5:21 pm

It means that the su command is not being run in a terminal. Using su seems a bit of a risk anyway, sudo may be better and will run from a program.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8555
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

RE: su in gambas

Postby kricit » Thu Sep 29, 2005 8:38 am

Hi, thanks for the reply I will try sudo now.......... Yep it works, thanks but it won't accept my root or user pswd. Does it have a password and how can i obtain it. I know that giving root priviledges is usually a bad idea but the program in question is Instaleeze and people can perform removal or installation of software without it. thanks for the information so far.

Many Thanks

Ashley Johnson
Kricit :: Open Source Freedom
User avatar
kricit
 
Posts: 3
Joined: Fri Sep 16, 2005 2:36 pm

RE: su in gambas

Postby nelz » Thu Sep 29, 2005 8:52 am

You can set up sudo to allow users to run specific commands without a password. By default it won't allow anyone to run anything, you have to add the relevant commands and users to /etc/sudoers.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8555
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK


Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests