1

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

Pavel S.
  • 2,116
Beginners
  • 33
  • 1
  • 1
  • 4

1 Answers1

2

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.)

Eliah Kagan
  • 117,780