On 5/26/07, <b class="gmail_sendername">Ricardo C O Freitas</b> <<a href="mailto:ricardo.cofreitas@terra.com.br">ricardo.cofreitas@terra.com.br</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="font-size: 12pt; font-family: Sans Serif;">
<p></p>
<p>I was trying to add the user to cups, following cups site info:</p>
<p></p>
<p>with this:</p>
<p></p>
<p>usermod -G lpadmin myuser</p>
<p></p>
<p>The result was a mess!</p>
<p></p>
<p>Many of the services are not allowed to me as user anymore!</p>
<p></p>
<p>When as user I type: </p>
<p></p>
<p>sudo mc</p></div></blockquote><div><br>usermod can be dangerous. The correct syntax is:<br><br>$ sudo usermod -aG lpadmin myuser<br><br>The 'a' option appends the user to the group, without it, you make the user of the specified group and remove membership from all others. The net effect is that your user account is no longer a member of 'admin'.
<br><br>For the future, Ubuntu (Debian) provides some 'friendlier' tools for user administration including 'adduser'. The syntax below is the preferred method for adding a user to a group:<br><br>$ sudo adduser myuser lpadmin
<br><br>This would have left membership in all other groups.<br><br>Also, if you installed the cups package from the Ubuntu repositories, I think 'myuser' would have automatically been made a member of lpadmin.<br>
<br>As far as the fix goes, if you have another user account that is a member of admin, login using that account and add 'myuser' back to the appropriate groups. If you don't have another 'admin' account, you need to either boot in to single user mode or boot using a live CD (and mount your root file system), and use a text editor to add 'myuser' to the other groups in /etc/group. The following list will approximate a list of the groups 'myuser' should belong to (keeping in mind I may have different packages installed with slightly different groups):
<br></div><br></div>adm<br>dialout<br>cdrom<br>floppy<br>audio<br>dip<br>video<br>plugdev<br>users<br>lpadmin<br>scanner<br>myuser<br>admin<br><br>Hope this helps.<br><br>-- <br>Mitch<br>