Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Can anyone help me to add one line to any file from this:

/etc/passwd , /etc/shadow ,/etc/group

exp; username:!!: …. add to /etc/shadow by shell script without vi program

share|improve this question

1 Answer 1

Unless extraordinary circumstances make this unsuitable, it is preferable to make your script use utilities like passwd, usermod, groupmod, useradd, groupadd, adduser, and addgroup. (Check out the manual pages for those utilities, which are available on your Ubuntu system via the man commands and in yelp, and also on the web at http://manpages.ubuntu.com.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.