Re: Using passwd in a perl file to automate user creation Programming Software Development by Comatose …to ensure that --stdin will work with passwd on that server). This should suffice, however…PASSWD, "| passwd --stdin"); print PASSWD "$oldpass"; print PASSWD "$newpass"; print PASSWD "$newpass"; close(PASSWD…, and help with that. If, however, passwd on the server this will be run, supports… samba passwd from xp to linux Hardware and Software Linux and Unix by solo … failed I am using exactly the same user and passwd from linux to access the samba server, and it…works from there. Here is my smb.conf, the passwd was generated using smbpasswd I've googled all around,…log size = 0 security = user encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd socket options = TCP_NODELAY SO_RCVBUF=8192 … program to read print who you are, based on your user account in/etc/passwd. Programming Software Development by sharma_vivek82 [code]import posix import string uid = `posix.getuid()` passwd = open('/etc/passwd') for line in passwd.readlines(): rec = string.splitfields(line, ':') if rec[2] == uid: print 'hello', rec[0], print 'mind if we call you bruce?' break else: print "I can't find you in /etc/passwd" :) [/code] Using passwd in a perl file to automate user creation Programming Software Development by Deathwish … the password for the user after useradd. Using passwd on its own requires interaction to type in the… -m $user"); system ("echo $userpass | --stdin passwd $user"); [/code] This gives me the error: sh: … near unexpected token `|' sh: -c: line 2: ` | --stdin passwd moose' moose being the username I used :mrgreen: It was… validating with /etc/passwd and /etc/shadow Programming Software Development by Korakos …for a username and password, and validate it through /etc/passwd and /etc/shadow. I've looked all over the … get from the shadow file, and the command [CODE]openssl passwd -salt [I]salt[/I] [[I]password to verify[/I]] … i also have to enable password modification, without the [I]passwd[/I] command, said user must have an encrypted password and… Re: Using passwd in a perl file to automate user creation Programming Software Development by Comatose …'t), then even manually opening and editing the shadow and passwd files isn't going to fly. I've got myself… other people checking into this right now... it seems that passwd, along with su, demand input from the keyboard.... for security… Re: question on /etc/passwd file Hardware and Software Linux and Unix by Fest3er I believe /etc/passwd is 'keyed' on the username, and I …these users would be the first one in /etc/passwd. Of course, some will say that this is … only to the actual passwords; it shadows /etc/passwd and stores the encrypted passwords in a file readable …only by root. The system still uses /etc/passwd to find the user name associated with a UID,… Re: validating with /etc/passwd and /etc/shadow Programming Software Development by Korakos … "Please insert username : " read usrname contrl=`cat /etc/passwd | grep $usrname` if [ "$contrl" != "" ] then usrchk… $usrname | cut -d: -f2 | cut -d$ -f 3` contrl=`openssl passwd -$encrypt -salt $salt $password` if [ "$contrl" = "`cat… Scripting passwd with perl on SYS V (AIX). Programming Software Development by sut I want to script the use of passwd. Since it accesses the controlling tty directly, I cannot do … a network. Right now, to test, it should display what passwd writes to the tty and reply with what is input… Re: validating with /etc/passwd and /etc/shadow Programming Software Development by Korakos … specifically for that function, i mean, i could edit etc/passwd and /etc/shadow... but that prospect alone is scary... (dont… question on /etc/passwd file Hardware and Software Linux and Unix by gplkrsna Hi Friends, I need a clarification on /etc/passwd file. Can it have same user name entry two times, if so what is the use of it. I see it applying the first entry's configuration only. What is the use of second entry with different configuration. Can somebody please clarify about this. Thanks. Gpl. Re: JS passwd length validation Digital Media UI / UX Design by lewashby if($row['password'] == $passwd) { echo "<html>"; echo "<body&… Re: samba passwd from xp to linux Hardware and Software Linux and Unix by alc6379 try [b]encrypt passwords = no[/b] in your smb.conf and restart samba. does that make a difference? Also, is your XP username [b]solo[/b]? I've had a lot of trouble accessing Samba shares as a different user than what my current XP username is... Re: samba passwd from xp to linux Hardware and Software Linux and Unix by knute How many computers are on your network anyway? If there is only 2 then why is your hosts allow set up so odd? Re: samba passwd from xp to linux Hardware and Software Linux and Unix by TheOgre You need to add a samba user to the samba server. Normally, whatever you use as a login on your WinXP box shold be added to your *nix box by doing: smbpasswd -a username If you use a password on your WinXP box, make it the same password in samba so you won't have to login to access the samba shares. For example, if I use "TheOgre&… Re: samba passwd from xp to linux Hardware and Software Linux and Unix by solo actually everything now works fine, no config is changed, just a few reboots? have no idea why it worked now, yet another xp mystry for me. Thanks for your replies. Re: samba passwd from xp to linux Hardware and Software Linux and Unix by ibi001 I had the same problem logging in with windows... I had a standard id and standard password and still it would not let me in... Maybe I didn't add the correct user id for samba ????? Windows would not let me in.... I had security turned off and it still would not allow my password to take effect... I will do what u said above and see … Re: program to read print who you are, based on your user account in/etc/passwd. Programming Software Development by vegaseat Indent it correctly, download posix and give it a try. Re: program to read print who you are, based on your user account in/etc/passwd. Programming Software Development by alc6379 Looks like it should work, assuming you have posix there. Re: Using passwd in a perl file to automate user creation Programming Software Development by Comatose What type of privs do you have on the box, or do you have super user/root access? Is LDAP installed on the system already, or PAM, or Expect.pm? I'll keep digging around and see what I can't make happen, but it may come down to editing the md5 digest pm, and finding the sub that actually creates the MD5 hash, and just adding that sub into your … Re: Using passwd in a perl file to automate user creation Programming Software Development by Deathwish Yes I have full access to my machine, but the person who will run the script wont have so extra modules being installed is a no no. Has to be done in a default env. Re: Using passwd in a perl file to automate user creation Programming Software Development by Deathwish Nice one, thanks mate! I'd give you a virtual beer if I could :D Re: Using passwd in a perl file to automate user creation Programming Software Development by Comatose Appreciate it.... but most of that credit goes to Narue. I put forth my stretch of effort, but without her I'd still be looking. Re: validating with /etc/passwd and /etc/shadow Programming Software Development by rch1231 Here is the best way I know of using C and compiling: [URL="http://www.google.com/url?sa=t&source=web&cd=4&sqi=2&ved=0CCoQFjAD&url=http%3A%2F%2Fwww.digitalpeer.com%2Fid%2Fhowto&rct=j&q=linux%20verify%20password&ei=zBV6TKjrDcOGnQeIl4D4AQ&usg=AFQjCNGNHCGS57KcTKLgRn1YRJ7t-GwrsA&cad=rja"]http://www.… Re: Scripting passwd with perl on SYS V (AIX). Programming Software Development by KevinADC [QUOTE]I think I need to do something to make the new tty the controlling terminal for the forked process but cannot find out what it is I need to do.[/QUOTE] I personally have no idea how to do that. If you get no answers here you may want to post on [url]www.perlmonks.com[/url] Re: Scripting passwd with perl on SYS V (AIX). Programming Software Development by sut Hi. It works now. If you're interested, it's here: [URL]http://www.daniweb.com/techtalkforums/post251917.html#post251917[/URL] Re: question on /etc/passwd file Hardware and Software Linux and Unix by hotelaudit I don't know the solution for your problem I just would like let you know that the etc/shadow is more secure . . . Assignment- multiple errors (using else if statements) Programming Software Development by compuser …if(!invalidArgs && (no <= 0 || passwd <= 0)) { invalidArgs = true; } PhoneCard card…; } if(!invalidArgs && inl.hasNextInt()) { passwd = inl.nextInt(); } else { invalidArgs = true;… header location Programming Web Development by LloydFarrell …remember me feature $email = strip_tags($email); $passwd = strip_tags($passwd); $email = mysql_real_escape_string($email); $passwd = mysql_real_escape_string($passwd); $email = eregi_replace("`", "…l-test.php?msg=$error_message"); exit; } $passwd = sha1($passwd); // in order to check for the the '… Escaping Encrypted password strings Community Center by ajcamp …luck. Any help? Thanks. USER=newuser PASSWD=`openssl passwd -1 $USER` echo $PASSWD returns $1$2DIVvhnL$5aSr5G1O17cQXdG8HshOu. CMD="…7::: The $1$2 portion of the passwd has been dropped. If there are other special…I've tried variations like PASSWD=`openssl passwd -1 $USER` CMD="useradd -p $PASSWD $USER" CMD="…