LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 05-15-2006, 05:18 PM   #1
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
linux password hashing


How can I access the *nix user/password hash with Gambas?

I'm trying to write a program that does some system tasks, and for some of them, root privalege is needed, so I provide a little prompt for the user to type in the root password to grant them privalege to run the task.
 
Old 05-17-2006, 12:47 AM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
Normally you'd access the sudo cmd eg by shelling out to the cmd line.
 
Old 05-17-2006, 05:40 PM   #3
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Original Poster
Rep: Reputation: 65
sorry, chrism01, I'm not quite sure I follow...
 
Old 05-17-2006, 08:41 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
Basically, you should never give root passwd to a user. Instead, use the sudo facility to enable the user to run specific cmds as root.
To actually do this from within a prog lang, normally you'd shell out using eg the system() fn passing a string like this:
sudo cmd_to_do
Normally using sudo the user has to supply his own passwd, but I think you can enable it without if you want.
Not sure if Gambas has a system() call fn... never used it.
 
Old 05-17-2006, 10:24 PM   #5
microsoft/linux
Senior Member
 
Registered: May 2004
Location: Sebec, ME, USA
Distribution: Debian Etch, Windows XP Home, FreeBSD
Posts: 1,445
Blog Entries: 9

Rep: Reputation: 45
ummm...just out of curiousity, will gambas compile a program for linux? Gambas is the linux version of the VB compiler right? How does that work?
 
Old 05-18-2006, 03:12 PM   #6
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Original Poster
Rep: Reputation: 65
thanks for your reply chrism01 muchly appreciated.

microsoft/linux:
Gambas (Gambas Almost Means BASic) is an interpretation of VB for linux. It is not VB ported to linux verbatim, but it keeps quite a few things the same. Some of the syntax has been changed around, and some things that were stupidly difficult to do in VB are made a fair bit easier in Gambas. Gambas will compile a linux executable binary, and it will also compile RPM and DEB packages.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dc++ client with tth hashing EmOuBi Linux - Software 3 11-30-2008 08:47 PM
Hiding smb mount password in fstab? Hashing? humbletech99 Linux - Networking 5 03-25-2006 12:07 PM
Hashing exploit threatens digital security ddaas Linux - Security 1 06-17-2005 08:29 AM
Command-line 'adduser': password not hashing Talesin Fedora 0 10-08-2004 09:19 PM
Linux and MD5 hashing GAVollink Programming 0 06-04-2003 02:12 PM


All times are GMT -5. The time now is 07:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration