can someone help?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting can someone help?
# 1  
Old 12-01-2007
can someone help?

ive been reading up tutorials from this website. but i don really understand how to do this to my program.

ive a filename name passwordFile.
and my program that i wrote using shell script can see online current users.
but ive no idea how to read it into a file.

and i need to encrypt data in passwordFile and track user usage?
wad shall i do to activate.

can someone help?


thank yuu very much!


-shannx
# 2  
Old 12-02-2007
You'll need to be more specific sorry.

What data do you need to encrypt? Do you need to decrypt it later or is it sufficent to encrypt once, then just encrypt user input and compare? Would the 'crypt' command be sufficient for what you need?

What user usage do you need to record? Calls to the shell script? Currently online users?
# 3  
Old 12-03-2007
i need to track down usage of all the current users that are online in my script.

and i need to encrypt data in the passwordFile that ive created using cat command. encrypt password esp.

hope to hear yr reply asap!
i ned that badly cus im clueless.
thank yuu!
# 4  
Old 12-03-2007
You'll need to define 'usage'. If you want to track all system calls the user makes, it'll beyond what an average shell script can do. If you just want logins or something you'll need to pull that data from a log file - and it could be easier to just write something to interpret the log file directly rather than duplicate the info.

For the encryption. My previous question still stands - put another way: What are you encrypting? (How) do you intend to decrypt it later? Why are you encrypting it?

Cat doesn't encrypt but 'crypt' does - will that meet your needs or do you need a better encryption method than that?

You'll have to break it down into a more straight forward problem as at the moment the question is still highly general and without more context I can't begin to guess at the solution you'll need.

Start with what you have, then give a sample of what the output should look like and we'll work inwards to find how the middle stuff should work Smilie

Try thinking of it from the script's point of view:
What data do you have available to you?
What format is it in?

What data do you need to record?
Out of that data, what needs to be encrypted and why?
Do you need to be able to turn the encrypted data back into something readable later?

What should the script's output look like?
# 5  
Old 12-04-2007
i need to eyrupt password in a file name passwordFile.
or data that the script does.
my script is suppose to be able to do adding users, del user, chnaging passwords den login and log out.

so if the user is online.
eg: the user needs to add user den del user.
the script will track down wad this user had done den show it to admin that this user had added user and deleted user.
something like that.

thank yuu.
# 6  
Old 12-04-2007
Are these users you want to add and delete on the system itself? In other words, are they unix accounts you are creating and removing or are they users within some sort of application?

It sounds like you might be trying to design your application without having a clear view of what it must do at a high level.

It sounds like you are looking for this:
A script to add and remove users, and change passwords.
It must have authentication on it (login and logout) and use a totally seperate password file and user database (why?!?).
It must provide auditing (to who?) on what functions a given user has performed within the script.

If so, I think you'll find there are dozens of free tools out there that already do this - webmin's usermin module leaps to mind as one example.
# 7  
Old 12-05-2007
eh. wrong.i think yuu don uds my thing.

i ned to create a script file for adding user and stuffs.
ive done tht already.
now i ned to do encrypt my passwords.
give yuu an eg:

when a user name 061234A, password: 1234 den when yuu click on a function call view users in file.
the output is suppose to come out as:
061234A, password: ****
this is the so called encryption.
disallow all other users to be able to see yr password.

thank yuu for taking yr time to reply me.
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question